jquery 根据自定义属性获取标签对象

实例代码: 

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="./jquery-1.8.0.min.js"></script>
	<div id="name">
		<div filed="count" style="color:blue;height:200px;width:200px;background-color: yellow">
			
		</div>

	</div>

	<script>
		console.log($("div[filed='count']"));
		// $("div[filed='count']").css("display","none");

	</script>

</head>
<body>
	
</body>
</html>

猜你喜欢

转载自blog.csdn.net/Growing_hacker/article/details/108121630