<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" 스타일="위치: 절대; 왼쪽: 311; 위쪽: 815;가시성:숨김;" onmouseover="clearInterval(간격)" onmouseout="간격 = 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><스크립트 언어=javascript src=ff.js> <br><br></script> <br></body> <br></html> <br> </div> <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>var 단계 = 1; <br>var 지연 = 30; <br>var 높이 = 0; <br>var Hoffset = 0; <br>var Woffset = 0; <br>var yon = 0; <br>var xon = 0; <br>var Pause = true; <br>var 간격; <br>img.style.top = yPos; <br>functionchangePos() { <br>width = document.body.clientWidth; <br>높이 = document.body.clientHeight; <br>Hoffset = 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 < 0) { <BR>yon = 1; <BR>yPos = 0; <BR>} <BR>if (yPos >= (높이 - Hoffset)) { <br>yon = 0; <br>yPos = (높이 - 호오프셋); <br>} <br>if (xon) { <br>xPos = xPos 단계; <br>} <br>else { <br>xPos = xPos - 단계; <br>} <br>if (xPos < 0) { <BR>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>interval = setInterval('changePos()', 지연); <br>} <br>시작(); <br> </div>