jquery的add()方法扩大选择返回

 <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="jquery-1.11.3.min.js"></script>
<title>Title</title>
</head>
<body>
<div>你好</div>
<p>你好</p>
<h1>你好</h1>
<script type="text/javascript">
$(document).ready(function(){
//jquery add()方法是选择更多的元素
$("div").add("p").add("h1").css({"width":"100px","height":"100px","background":"orange","display":"inline-table"});
});
</script>
</body>
</html>

jquery的add()方法扩大选择返回

上一篇:Hibernate关系级别注解


下一篇:HDOJ(HDU) 1555 How many days?(水题)