zoukankan      html  css  js  c++  java
  • jquery选中表格的某行变色

    <tr ng-click="+"selectRow("+i+");"+" ng-mouseover="+"changecolor("+i+");"+" id="+i+"></tr>
    				
    	//变色 
    	$scope.changecolor = function (id){
    		//第一种写法 不建议
    		if(id=="1"){
    			document.getElementById("1").style.background='#FFFF99';					
    			document.getElementById("2").style.background='';
    			document.getElementById("3").style.background='';
    		}else if(id=="2"){
    			document.getElementById("1").style.background='';
    			document.getElementById("2").style.background='#FFFF99';
    			document.getElementById("3").style.background='';
    		}else if(id=="3"){
    			document.getElementById("1").style.background='';
    			document.getElementById("2").style.background='';
    			document.getElementById("3").style.background='#FFFF99';
    		}
    		//另外一种写法 灵活
    		var selrow="#"+id;
    		/*if(id=="1"){
    			$("#1").parent().children().css({'background':''});
    			$("#1").css({'background':'#FFFF99'});
    		}*/	
    		$(selrow).parent().children().css({'background':''});
    		$(selrow).css({'background':'#FFFF99'});
    	}



  • 相关阅读:
    论文笔记:SRCNN
    4.2 CNN实例探究
    4.1 卷积神经网络
    3 ML策略
    2.3 超参数调试,batch正则化和程序框架
    2.2 优化算法
    2.1 深度学习的实用层面
    Lecture4 反向传播算法
    Lecture3 神经网络学习
    java基础部分
  • 原文地址:https://www.cnblogs.com/lxjshuju/p/6973825.html
Copyright © 2011-2022 走看看