久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      jquery怎么查找不含某個(gè)屬性的元素

      查找方法:1、利用“:not()”和“[attribute]”選擇器,語法“$("元素:not([attribute])")”;2、利用not()方法和“[attribute]”選擇器,語法“$(元素).not([attribute])”。

      jquery怎么查找不含某個(gè)屬性的元素

      本教程操作環(huán)境:windows7系統(tǒng)、jquery1.10.2版本、Dell G3電腦。

      在jquery中,想要查找含某個(gè)屬性的元素,需要使用屬性選擇器[attribute]。

      而查找不含某個(gè)屬性的元素,就需要組合一個(gè)否定選擇器“:not()”或 not()方法。

      語法:

      :not([attribute]) not([attribute])

      示例:

      <!DOCTYPE html> <html> 	<head> 		<meta charset="utf-8"> 		<script src="js/jquery-1.10.2.min.js"></script> 		<script type="text/javascript"> 			$(document).ready(function() { 				$("li:not([id])").css("background-color", "#B2E0FF"); 				$("li").not("[class]").css("background-color", "#ff0307"); 			}); 		</script>  	</head> 	<body> 		<html> 			<body> 				<div id="choose"> 					Who is your favourite: 					<ul> 						<li id="li1">Goofy</li> 						<li id="li2" class="li">Mickey</li> 						<li class="li">Pluto</li> 					</ul> 				</div> 			</body> 		</html>   	</body> </html>

      jquery怎么查找不含某個(gè)屬性的元素

      相關(guān)教程推薦:jQuery視頻教程

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)