jquery 遍历body所有div元素
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> jquery遍历所有div元素 </title>
<script src="jquery-2.0.3.js"></script>
<script>
$(function(){
$("div").each(function(){
alert($(this).html());
});
});
</script>
</head>
<body>
<div>ok</div>
<div>KFC</div>
</body>
</html>