日期:2014-05-16 浏览次数:20358 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script src="jquery-1.6.1.js"></script>
<script>
function showTab1(){
alert("鼠标进入 F1");
}
function disTab1(){
alert("鼠标离开 F1");
}
function showTab2(){
alert("鼠标进入 F2");
}
function disTab2(){
alert("鼠标离开 F2");
}
function showTab3(){
alert("鼠标进入 F3");
}
function disTab3(){
alert("鼠标离开 F3");
}
</script>
</head>
<body>
<br/>
<div id="f1" style="width:400px; height:400px; background:green;" onmouseover="showTab1()" onmouseout="disTab1()">
<div id="f2" style="width:200px; height:200px; background:blue;" onmouseover="showTab2()" onmouseout="disTab2()">
<div id="f3" style="width:100px; height:100px; background:red;" onmouseover="showTab3()" onmouseout="disTab3()">
</div>
</div>
</div>
<br/>
</body>
</html>
var getAllChildNodes = function(obj){//得到某元素的子元素(包括子元素的子元素)
var nodes = obj.childNodes;
var arr = [];