function Fromid (ID) {
return document.getElementById (ID);
}
function Show_alert (msg, type, time) {
var layer_obj = Fromid ("Alert_layer");
var layer_text= fromid ("Alert_text");
var line_height = (Document.documentelement.scrolltop = = 0)? Document.body.scrolltop:document.documentelement.scrolltop;
layer_text.innerhtml = msg;
With (Layer_obj.style) {
ZIndex = 999;
top = line_height-40;
left = DOCUMENT.BODY.CLIENTWIDTH/3;
display = "Block";
Position = "absolute";
if (type = = "Error") {
Background = "url (http://" +style_domain+ "/snake/index/msgbox_right_bg2.jpg)";
}
}
layer_obj.filters[0].opacity = "0.8"; Transparency is 80%
if (time = = undefined) time = 3000;
else time = time*1000;
var top = line_height-40;
var speed = 1.5;
time-= 1000;
The control window moves down to the edge of the page
Move_down = function Movefplogo () {
top+= speed;
Layer_obj.style.top = top;
if (Top < Line_height) settimeout ("Move_down ()", 1);
else settimeout ("Close_alert_win ()", time);
}
Move_down ();
}
function Close_alert_win () {
var layer_obj = Fromid ("Alert_layer");
The control window fades away
if (Layer_obj.filters[0].opacity < 0.02) {
Layer_obj.style.display = "None";
return true;
}
layer_obj.filters[0].opacity-= 0.02;
SetTimeout ("Close_alert_win ()", 1);
}
Document.writeln ("Filter:progid:dximagetransform.microsoft.basicimage ()"; > ");
Document.writeln ("");
Document.writeln ("");
Document.writeln ("");
Look at one more example
<meta name= "keywords" content= "webmaster, Web effects, JS special effects, advertising code, zzjs,zzjs.net,sky,www.111cn.net, webmaster effects net"/>
<meta name= "description" content= "www.111cn.net, webmaster special effects nets, webmaster necessary JS special effects and advertising code. A large number of high-quality JS special effects, to provide high-quality advertising code to download, to do in webmaster effect nets "/>
<script type= "text/web Effects" >
function S (i) {return document.getElementById (i);}
function Download (evt, FID) {
var _event = evt? Evt:event;
var _target = evt? Evt.target:event.srcelement;
var _p = s ("Downloadpanel");
_p.style.top = _event.clienty + document.body.scrolltop;
_p.style.left = (_event.clientx + document.body.scrollleft < 160? _event.clientx + Document.body.scrollleft + 10: _ Event.clientx + document.body.scrollleft-120);
Show ("Downloadpanel", true);
_p.focus ();
}//Welcome to Webmaster effects nets, our web site is www.111cn.net, very well remember, ZZ webmaster, JS is JS special effects, this site collects a large number of High-quality JS code, there are many advertising code download.
function Show (obj, bshow) {
obj = (typeof (obj) = "string"? s (obj): obj);
if (obj) obj.style.display= (bshow?) "": "None");
}
function Hidedownloadpanel (evt) {
Show ("Downloadpanel", false);
}
function Checkclick (evt) {
var _target = evt? Evt.target:event.srcelement;
var _id = _target.id;
if (_id = = "") {
_id = _target.parentnode.id;
}
if (_id!= "Downloaddirect" && _id!= "downloadagent" && _id!= "Downloadpanel" && _id.indexof ("Do Wnloadfile_ ") < 0 && _id.indexof (" downloadlink_ ") < 0) {
Show ("Downloadpanel", false);
}
}//Welcome to Webmaster effects nets, our web site is www.111cn.net, very well remember, ZZ webmaster, JS is JS special effects, this site collects a large number of High-quality JS code, there are many advertising code download.
Window.onload = function () {
Document.body.onclick=checkclick;
}
</script>
<style type= "Text/css Tutorial" >
html,body{
font-size:12px;
}
img {Border:none}
A {color: #4d5d2c; text-decoration:underline;cursor:pointer;}
. pointer {Cursor:pointer}
. Right {Float:right}
. Right img{margin:0 0 0 6px}
. infobar {background: #fff9e3; border:1px solid #fadc80; color: #743e04; margin-bottom:10px;padding:8px 20px 4px 20px;}
</style>
<body>
<a href= "< #zc_blog_host #>" > Webmaster special effects Network </A>, webmaster required high-quality Web page special effects and advertising code. Zzjs.net, webmaster JS special effects. <!--Welcome to Webmaster Effects Network, our site collects a large number of high-quality JS special effects, providing a lot of advertising code download, URL: www.111cn.net,zzjs@msn.com, with. NET to build Liang station-->
<div id= "Downloadpanel" style= "position:absolute;top:0px;left:0px;width:160px;z-index:999;padding:6px 2px 6px 10px;border:1px solid #fb7;d isplay:none; "class=" InfoBar ">
<div class= "" > Download mode:</div>
<div style= "padding:6px 0 0 0;" ><a id= "Downloaddirect" > Direct download </a> <a id= "Downloadagent" style=: underline; " title= "Download this file with QQ Super whirlwind" > Use whirlwind to download </a><span class= "Addrtitle" style= "Display:none;" id= "Downloadqqdownload" > Install <a href= "http://im.qq.com/cyclone/download.shtml" target= _blank "onclick=" alert (' After installing Super Whirlwind, Restart the browser to use a whirlwind to download. "Title=" You have not installed the Super Cyclone download software, click here to download the installation. "> Cyclone </a> download </span></div>
<div class= "Addrtitle" style= "padding:6px 0 0 0;" >
(Extract code: <span id= "Downloadcode" >xxxxxxx</span>)
</div>
</div>
<a id= "downloadlink_001" title= "onclick=" Download (event, ' Downloadlink '); "> Download </a><a id=" downloadlink_002 "title=" "onclick=" Download (event, ' Downloadlink '); "> Download </a><a id=" downloadlink_003 " Title= "" onclick= "Download (event, ' Downloadlink ');" > Download </a>
<a id= "downloadlink_004" title= "onclick=" Download (event, ' Downloadlink '); "> Download </a>
</body>