jquery obtains label objects according to custom attributes

Example code: 

<!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>

 

Guess you like

Origin blog.csdn.net/Growing_hacker/article/details/108121630