popup的两种方法

<script> var pop; function window.onload() { document.all .eMeng.style.display='none'; window.setTimeout(aaa,5000); } function aaa() { var div=document.all .eMeng; var body=document.body; pop=window.createPopup(); // html=div.innerHTML; html="

ssssopen
"; pop.document.body.innerHTML=html; pop.document.body.style.border="solid 1px"; //pop.document.body.style.bgColor="#efefeb"; divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight =body.clientHeight; y = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight x = parseInt(body.scrollLeft,10) + docWidth - divWidth; pop.show(x, y, 180, 116, null); } function closeDiv() { window.alert('sss'); } </script> 1,popup  <script> var pop; function window.onload() { document.all .eMeng.style.display='none'; window.setTimeout(aaa,5000); } function aaa() { var div=document.all .eMeng; var body=document.body; pop=window.createPopup(); // html=div.innerHTML; html="
ssssopen
"; pop.document.body.innerHTML=html; pop.document.body.style.border="solid 1px"; //pop.document.body.style.bgColor="#efefeb"; divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight =body.clientHeight; y = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight x = parseInt(body.scrollLeft,10) + docWidth - divWidth; pop.show(x, y, 180, 116, null); } function closeDiv() { window.alert('sss'); } </script>
var pop;
function window.onload() { document.all .eMeng.style.display='none'; window.setTimeout(aaa,5000); } function aaa() { var div=document.all .eMeng; var body=document.body; pop=window.createPopup(); // html=div.innerHTML; html="
ssssopen
"; pop.document.body.innerHTML=html; pop.document.body.style.border="solid 1px"; //pop.document.body.style.bgColor="#efefeb"; divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight =body.clientHeight; y = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight x = parseInt(body.scrollLeft,10) + docWidth - divWidth; pop.show(x, y, 180, 116, null); } function closeDiv() { window.alert('sss'); }
2,div
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0; var div=document.getElementById("eMeng"); var body=document.body ; function getMsg() { //window.parent.frames["TopMusic"].location.href = "Top.asp" try{ divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight = body.clientHeight; div.style.top = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight div.style.left = parseInt(body.scrollLeft,10) + docWidth - divWidth; div.style.visibility="visible"; objTimer = window.setInterval("moveDiv()",10); } catch(e){} } function resizeDiv() { i+=1; if(i>888) closeDiv(); try{ divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight = body.clientHeight; div.style.top = docHeight - divHeight + parseInt(body.scrollTop,10); div.style.left = docWidth - divWidth + parseInt(body.scrollLeft,10); } catch(e){} } function moveDiv() { try { if(parseInt(div.style.top,10) <= (docHeight - divHeight + parseInt(body.scrollTop,10))) { window.clearInterval(objTimer); objTimer = window.setInterval("resizeDiv()",1); } divTop = parseInt(div.style.top,10); div.style.top = divTop - 1; } catch(e){} } function closeDiv() { div.style.visibility='hidden'; if(objTimer) window.clearInterval(objTimer); } window.onload = getMsg; window.onresize = resizeDiv; window.onerror = function(){}


<script> var pop; function window.onload() { document.all .eMeng.style.display='none'; window.setTimeout(aaa,5000); } function aaa() { var div=document.all .eMeng; var body=document.body; pop=window.createPopup(); // html=div.innerHTML; html="
ssssopen
"; pop.document.body.innerHTML=html; pop.document.body.style.border="solid 1px"; //pop.document.body.style.bgColor="#efefeb"; divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight =body.clientHeight; y = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight x = parseInt(body.scrollLeft,10) + docWidth - divWidth; pop.show(x, y, 180, 116, null); } function closeDiv() { window.alert('sss'); } </script> <script> var pop; function window.onload() { document.all .eMeng.style.display='none'; window.setTimeout(aaa,5000); } function aaa() { var div=document.all .eMeng; var body=document.body; pop=window.createPopup(); // html=div.innerHTML; html="
ssssopen
"; pop.document.body.innerHTML=html; pop.document.body.style.border="solid 1px"; //pop.document.body.style.bgColor="#efefeb"; divTop = parseInt(div.style.top,10); divLeft = parseInt(div.style.left,10); divHeight = parseInt(div.offsetHeight,10); divWidth = parseInt(div.offsetWidth,10); docWidth = body.clientWidth; docHeight =body.clientHeight; y = parseInt(body.scrollTop,10) + docHeight + 10;// divHeight x = parseInt(body.scrollLeft,10) + docWidth - divWidth; pop.show(x, y, 180, 116, null); } function closeDiv() { window.alert('sss'); } </script>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值