我的第一個父元素就無法隱藏
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
*{margin:0px;padding: 0px;}
html{
height: 100%;
}
body{
background:url(images/body.png) center top;
height: 100%;
}
#mask{
height: 100%;
width: 100%;
position: absolute;
top: 0;
left:0;
background: #000;
opacity: 0.5;
filter:alpha(opacity=50);
display: none;
}
#searchTip{
width: 980px;
height: 800px;
position:absolute;
left: 50%;
margin-left: -490px;
display: none;
}
#searchTip div{
position: absolute;
display: none;
}
#searchTip div a{
position: absolute;
width: 95px;
height: 32px;
text-indent: -999px;
overflow: hidden;
cursor: pointer;
/*top: 231px;
left: 490px;*/
}
#searchTip div span{
position: absolute;
width: 30px;
height: 30px;
text-indent: -999px;
overflow: hidden;
cursor: pointer;
/*top:144px ;
left: 683px;*/
}
.stepA{
width: 745px;
height: 329px;
background: url(images/guide11.png);
top: 131px;
left: -9px;
}
.stepA span{
top: 144px;
left: 683px;
}
.stepA a{
top: 231px;
left: 490px;
}
.stepB{
width: 647px;
height:405px;
background: url(images/guide21.png);
top: 2px;
left: 324px;
}
.stepB a{
top: 308px;
left: 146px;
}
.stepB span{
top: 196px;
left: 285px;
}
.stepC{ background:url(images/guide31.png); width:654px; height:257px;top:294px; left:318px}
.stepC a{top:155px; left:400px; }
.stepC span{ top:44px; right:35px; }
.stepD{ background:url(images/guide41.png); ?width:558px; height:348px;top:78px; left:155px}
.stepD a{top:246px; left:304px;}
.stepD span{ top:135px; right:35px; }
.stepE{ background:url(images/guide51.png); width:397px; height:342px;top:79px; left:250px}
.stepE a{top:245px; left:153px;}
</style>
<script type="text/javascript">
window.onload=function(){
var oMask=document.getElementById('mask');
var oSearch=document.getElementById('searchTip');
var aStep=oSearch.getElementsByTagName('div') ;
var aA=oSearch.getElementsByTagName('a');
var aClose=oSearch.getElementsByTagName('span');
? ?oMask.style.display=oSearch.style.display=aStep[0].style.display="block";
? ?//下一步按鈕
? ?for(var i=0;i<aStep.length;i++){
? ? aA[i].index=i;
? ? aA[i].onclick=function(){
? ? this.parentNode.style.display="none";
? ? }
? ?}
??
}?
</script>
</head>
<body>
<div id="mask"></div>
<div id="searchTip">
<div><a href="">下一步</a><span title="關(guān)閉">關(guān)閉</span></div>
<div><a href="">下一步</a><span title="關(guān)閉">關(guān)閉</span></div>
<div><a href="">下一步</a><span title="關(guān)閉">關(guān)閉</span></div>
<div><a href="">下一步</a><span title="關(guān)閉">關(guān)閉</span></div>
<div><a href="">下一步</a></div>
</div>
</body>
</html>
麻煩幫我看一下
2015-10-26
權(quán)限不高的問題
2015-10-26