关闭

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

1576人阅读 评论(0) 收藏 举报

函数介绍

函数名: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>

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:183362次
    • 积分:2496
    • 等级:
    • 排名:第15292名
    • 原创:69篇
    • 转载:13篇
    • 译文:0篇
    • 评论:32条
    最新评论
    学校网站