ASP

本类阅读TOP10

·asp常用数据库连接方法和技巧
·无组件生成BMP验证码
·一些常用的辅助代码 (网络收藏)
·JavaScript实现的数据表格:冻结列、调整列宽和客户端排序
·VisualStudio.NET_2003及其 MSDN 下载地址
·ASP模拟MVC模式编程
·图片以二进制流输出到网页
·MD5加密算法 ASP版
·ASP.NET编程中的十大技巧
·改进 ASP 的字符串处理性能

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
popup的两种方法

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

1,popup 
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="
ssss open
"; 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(){}





相关文章

相关软件