<div class="codetitle"> <span><a style="CURSOR: pointer" data="62992" class="copybut" id="copybut62992" onclick="doCopy('code62992')"><u>复制代码</u></a></span>代码如下:</div> <div class="codebody" id="code62992"> <br><html> <br> <br><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <br><title>带关闭按钮的网页漂浮广告代码</title> <br></head> <br> <br><div id="img" style="位置: 絶対; 左: 311; 上: 815; 可視性:非表示;" onmouseover="clearInterval(間隔)" onmouseout="interval = setInterval('changePos()', 遅延)" align="right"> <br><a href="#" target="_blank"><img border="0" src="图片路径" onload="return imgzoom(this,600);" onclick="javascript:window.open(this.src);" style="cursor:pointer;"/></a> <br><span style="CURSOR:hand;color:red;font-weight:bold" onclick="clearInterval(interval);img.style.visibility = 'hidden'">X</span> <br> </div> <br> <br><br></script> <br></body> <br></html> <br> <br>ff.js代码 <br><div class="codetitle"> <span><a style="CURSOR: pointer" data="54706" class="copybut" id="copybut54706" onclick="doCopy('code54706')"><u>复制代</u></a></span> 代码如下:</div> <div class="codebody" id="code54706"> <br>var xPos = 20; <br>var yPos = document.body.clientHeight; <br>変数ステップ = 1; <br>var 遅延 = 30; <br>var 高さ = 0; <br>var ホオフセット = 0; <br>var Woffset = 0; <br>変数 = 0; <br>var xon = 0; <br>var 一時停止 = true; <br>var 間隔; <br>img.style.top = yPos; <br>function changePos() { <br>width = document.body.clientWidth; <br>高さ = document.body.clientHeight; <br>ホオフセット = img.offsetHeight; <br>Woffset = img.offsetWidth; <br>img.style.left = xPos document.body.scrollLeft; <br>img.style.top = yPos document.body.scrollTop; <br>if (yon) { <br>yPos = yPos ステップ; <br>} <br>else { <br>yPos = yPos - ステップ; <br>} <br>if (yPos yon = 1; <br>yPos = 0; <br>} <br>if (yPos >= (高さ - ホオフセット)) { <br>yon = 0; <br>yPos = (高さ - ホオフセット); <br>} <br>if (xon) { <br>xPos = xPos ステップ; <br>} <br>else { <br>xPos = xPos - ステップ; <br>} <br>if (xPos xon = 1; <br>xPos = 0; <br>} <br>if (xPos >= (幅 - Woffset)) { <br>xon = 0; <br>xPos = (幅 - Woffset); <br>} <br>} <br>function start() { <br>img.style.visibility = "visible"; <br>間隔 = setInterval('changePos()', 遅延); <br>} <br>start(); <br> </div>