JavaScript (native)-New guide Practice

Source: Internet
Author: User

<! DOCTYPE html>
<meta http-equiv= "Content-type" content= "text/html; Charset=utf-8 "/>
<title> New Guide </title>
<style>
*{margin:0; padding:0}
html{height:100%}
Html.noscrollbar{width:100%;height:100%;overflow:hidden;}
body{height:100%}
#mask {height:100%; width:100%; background: #000; opacity:0.5; Filter:alpha (opacity=50); position:absolute; left:0; top : 0; Display:none}
#searchTip {width:980px; height:100%; margin:0 auto; position:absolute;top:0;left:50%;margin-left:-490px; display: None
#searchTip div{position:absolute; Display:none}
#searchTip Div a{position:absolute;width:96px; height:32px; cursor:pointer; text-indent:-999px; Overflow:hidden}
#searchTip div span{cursor:pointer; position:absolute; width:30px; height:30px;text-indent:-999px; Overflow:hidden}
. stepa{Background:url (images/guide11.png); height:329px; width:745px; top:130px; left:-9px; Display:block}
. Stepa a{top:230px; left:490px;}
. Stepa span{top:143px; right:32px;}
. stepb{Background:url (images/guide21.png); width:647px; height:405px;top:2px; left:324px}
. STEPB a{top:308px; left:146px;}
. STEPB span{top:196px; right: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;}
. imgs{margin:0 auto;width:980px;}
. IMGs Div.one{background:url (images/body.png) center top;}
</style>
<script type= "Text/javascript" src= "Js/jquery-1.7.min.js" ></script>
<body>
<div class= "IMGs" >
<div class= "One" style= "height:1694px;width:980px;&nbsp;</div>
</div>
<div id= "Mask" ></div>
<div id= "Searchtip" >
<div class= "Stepa" ><a> next </a><span title= "Close" > Close </span></div>
<div class= "STEPB" ><a> next </a><span title= "Close" > Close </span></div>
<div class= "Stepc" ><a> next </a><span title= "Close" > Close </span></div>
<div class= "STEPD" ><a> next </a><span title= "Close" > Close </span></div>
<div class= "Stepe" ><a> next </a></div>
</div>
</body>
<script type= "Text/javascript" >
Window.onload = function () {
var mask = document.getElementById (' mask '),
Searchtip = document.getElementById (' Searchtip '),
Steps = Searchtip.getelementsbytagname (' div '),
nexts = Searchtip.getelementsbytagname (' a '),
Coslebtns = Searchtip.getelementsbytagname (' span ');
var html = document.getelementsbytagname (' html ') [0];

var newguidance = function () {
Mask.style.display = SearchTip.style.display = Steps[0].style.display = ' block ';
Html.classname = ' Noscrollbar '; Yin Dao
for (var i = 0, L = nexts.length; i < L; i++) {
Nexts[i].index = i;
Nexts[i].onclick = function () {
This.parentNode.style.display = ' None ';
if (This.index < nexts.length-1) {
Console.log (This.index);
Steps[this.index + 1].style.display = ' block ';
}else if (This.index = = nexts.length-1) {
Mask.style.display = SearchTip.style.display = ' None ';
Html.classname = ";
}else{
Return
}
}
}//close Yindao
for (var i = 0, L = coslebtns.length; i < L; i++) {
Coslebtns[i].onclick = function () {
Mask.style.display = SearchTip.style.display = ' None ';
Html.classname = ";
}
}//add Cookie
var date = new Date ();
Date.setdate (date.getdate () + 30);
Document.cookie = ' name=newguidances;expires= ' +date;
}; Get Cookie
if (document.cookie.substring (5)! = ' newguidances ') {
Newguidance ();
}else{
Return
}
};
</script>

JavaScript (native)-New guide Practice

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.