日期:2014-05-17 浏览次数:20801 次
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
</script>
<script>
$(document).ready(function(){
var size= document.getElementsByTagName("span");
for(var o in size){
document.getElementsByTagName("span")[o].style.backgroundColor='red';
}
});
</script>
</head>
<body>
<span>全部</span>
<p>r,我d会434消失。</p>
<p>点击我,er消d失。</p>
<span>54545</span>
<p>也要点击我哦。</p>
<span>全部dwewe</span>
</body>
</html>