日期:2014-05-16 浏览次数:20403 次
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk0" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> ww </li>
</ul>
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk1" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> aa </li>
</ul>
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk2" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> bb </li>
</ul>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
</style>
</head>
<body>
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk0" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> ww </li>
</ul>
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk1" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> aa </li>
</ul>
<ul class='overdiv'>
<li class="showImg"><input type="checkbox" name="chk2" class="chk" /><img id="ul0" src="images/net.png"/></li>
<li><b>责任人:</b> bb </li>
</ul>
<script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
function $t(name, cot){
cot = cot || document;
return cot.getElementsByTagName(name);
}
function autoFlash(obj, color1, color2){
obj.style.border = '1px solid #fff';
obj.timer = setInterval(function(){
var s = obj.style
if( s.borderColor == color1 ){
s.borderColor = color2;
}else{
s.borderColor = color1;
}
}, 101)
}
var uls = $t('ul');
autoFlash(uls[0], 'red', 'blue');
</script>
</body>
</html>
------解决方案--------------------
$(':not(.overdiv:nth-child(2))').css(
'border',
'1px solid #ccc'
);
------解决方案--------------------
jquery?
直接把 选择器 和 css 赋值 换下就可以了。
------解决方案--------------------
这里$和jquery的缩写 冲突了。
你用了jquery就把 上面的函数 cut 了吧
------解决方案--------------------
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
<style>
</style>