ASP DOT NET

基于web开发的技术研究

CreatePopup()函数的使用---弹出广告

函数介绍

函数名:createPopup()

使用的最要属性:

 PopMenu=window.createPopup();
 PopMenu.document.body.innerHTML=;
PopMenu.document.body.all.aaa.attachEvent("onclick",functionName);
PopMenu.show(x,y,w,h,document.body);

例子:

<SCRIPT>
var oPopup = window.createPopup();

var popTop=0;

var picwidth=1024;

var picheight=768;

var picadd="http://up1.tuzhan.com/data/200509/5b736ffeeb898f80a440d00eacc0a5c1_m.jpg";

var w3seas=150;

var w3seah=20;

var w3seaw=20;

var msg=" <span style=/"width:100%;font-weight:bold;color:red;font-size:22px;text-align: center;/">http://blog.csdn.net/dshpsky </br></span>";

var temp=screen.height-30-picheight-w3seah;

var winstr="<div style=/"border:1 solid #000000;width:"+picwidth+";height:"+picheight+";background:url('"+picadd+"');/"><div style='height:444;line-height: "+picheight+"px;'>"+msg+"</div></div>";

oPopup.document.body.innerHTML = winstr;

popshow();

function popshow(){

if(popTop>=picheight+w3seah+w3seas){

clearTimeout(mytime);

oPopup.hide();

return;

}else if(popTop>=picheight+w3seah){

oPopup.show(screen.width-picwidth-w3seaw,screen.height-30-picheight-w3seah,picwidth,picheight);

}else if(popTop>=picheight){

oPopup.show(screen.width-picwidth-w3seaw,screen.height-30-popTop,picwidth,picheight);

}else if(popTop<picheight){

oPopup.show(screen.width-picwidth-w3seaw,screen.height,picwidth,popTop);
}

popTop+=1;

var mytime=setTimeout("popshow();",8);

}
</SCRIPT>

阅读更多
文章标签: function div url c
个人分类: JavaScript
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

CreatePopup()函数的使用---弹出广告

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭