网页右下角自动弹出框代码
发布网友
发布时间:2022-04-25 22:11
我来回答
共1个回答
热心网友
时间:2022-04-25 23:40
<SCRIPT Language=Javascript>
<!--
var oPopup = window.createPopup();
var popTop=40;
function popmsg(msgstr){
var winstr="<table width=\"241\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td align=\"center\"><table width=\"90%\" height=\"180\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td valign=\"top\" style=\"font-size:12px;\"><a href=a.html>"+msgstr+"</a></td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML = winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
oPopup.hide();
return;
}else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-241,screen.height,241,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-241,screen.height+(popTop-1720),241,172);
}else if(popTop<172){
oPopup.show(screen.width-241,screen.height,241,popTop);
}else if(popTop<220){
oPopup.show(screen.width-241,screen.height-popTop,241,172);
}
popTop+=10;
var mytime=setTimeout("popshow();",20);
}
popmsg("<img border='0' src='iloveu.jpg' width='240' height='170' onClick=\"parent.location.href='http://www.baidu.com/';\">");
-->
</SCRIPT>
参考资料:http://zhidao.baidu.com/question/95770997.html