<div id="dcwj" class="flabox" style="position:absolute;z-index:1000;"> <div class="flatit"> <span> <a href="" title="招生简介" style="cursor: pointer;">招生简介</a> </span> </div> <ul class="flaul"> <c:forEach items="${newsInfoList}" begin="0" end="2" var="cur"> <c:url var="url" value="" /> <li><a title="招生简介" style=" text-decoration:none; href="" target="_blank"> <c:out value="" /> </a></li> </c:forEach> </ul> </div>
var x = 50,y = 60; var xin = true, yin = true; var step = 0.2; var delay = 10; var obj=document.getElementById("dcwj"); var width= window.screen.availWidth; var height = window.screen.availHeight; function dcwj() { var L=T=0; //var R= document.body.clientWidth-obj.offsetWidth; var R= width-obj.offsetWidth-35; //var B = document.body.clientHeight-obj.offsetHeight; var B = height-obj.offsetHeight-100; obj.style.left = x + (document.documentElement.scrollLeft || document.body.scrollLeft) + "px"; obj.style.top = y + (document.documentElement.scrollTop || document.body.scrollTop) + "px"; x = x + step*(xin?1:-1); if (x < L) { xin = true; x = L;} if (x > R){ xin = false; x = R;} y = y + step*(yin?1:-1); if (y < T) { yin = true; y = T; } if (y > B) { yin = false; y = B; } } var itl; if(obj!=null){ itl = setInterval("dcwj()", delay); } function closediv(){ clearInterval(itl); obj.style.display = "none"; }
Copyright © 2004-2024 Ynicp.com 版权所有 法律顾问:建纬(昆明)律师事务所 昆明市网翼通科技有限公司 滇ICP备08002592号-4