jq 判断内容是否为空,为空则不显示
<ulclass="pd_cat_ul"style="background-color:red;"><liclass="licharges"><!--[ifIE6]><a...
<ul class="pd_cat_ul" style="background-color: red; ">
<li class="li charges">
<!--[if IE 6]><a class="li" href="#nogo"><table><tr><td><![endif]-->
<a href="/Product/" _fcksavedurl="#nogo" class="option"><span>Porducts</span></a>
<ul class="pd_cat_ul" style="background-color: red; ">
<li class="li charges">
<!--[if IE 6]><a class="li" href="#nogo"><table><tr><td><![endif]-->
<a href="#nogo" _fcksavedurl="#nogo" class="option"><span>OEM Products</span></a>
<ul class="pd_cat_ul" style="background-color: red; ">
</ul>
<!--[if IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
<!--[if IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
请问的那代码是哪里错误了!谢谢
<script type="text/javascript">
$(document).ready(function(checkli){
$(".pd_cat_ul").each(function(){
$(this).css('background-color', 'red');
if($(this).html == ''){
alert("fine one NULL ");
}
})
});
window.attachEvent("onload",checkli);
</script> 展开
<li class="li charges">
<!--[if IE 6]><a class="li" href="#nogo"><table><tr><td><![endif]-->
<a href="/Product/" _fcksavedurl="#nogo" class="option"><span>Porducts</span></a>
<ul class="pd_cat_ul" style="background-color: red; ">
<li class="li charges">
<!--[if IE 6]><a class="li" href="#nogo"><table><tr><td><![endif]-->
<a href="#nogo" _fcksavedurl="#nogo" class="option"><span>OEM Products</span></a>
<ul class="pd_cat_ul" style="background-color: red; ">
</ul>
<!--[if IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
<!--[if IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
请问的那代码是哪里错误了!谢谢
<script type="text/javascript">
$(document).ready(function(checkli){
$(".pd_cat_ul").each(function(){
$(this).css('background-color', 'red');
if($(this).html == ''){
alert("fine one NULL ");
}
})
});
window.attachEvent("onload",checkli);
</script> 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询