欢迎光临
我们一直在努力

javascript右下解弹出广告代码

建站超值云服务器,限时71元/月

和消息提示一样,在右下角,并且可以随着滚动条的移动而上下移动,代码如下,点击以“运行代码”可以看看效果。
[code]
<style>
.t1{
 font-size:12px;
 color:#000064;
 padding-left:10px;
}
</style>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<script>
document.writeln("<div id=\"ShowAD\" style=\"position:absolute; z-index: 200;\"> ");
document.writeln("<div style=\"width:200px;height:15px;line-height:15px;text-align:right;\"><span style=\"cursor:pointer;font-size:12px;\" onclick=\"document.getElementById(\’ShowAD\’).style.display=\’none\’\">关闭<\/span><\/div> ");
document.writeln("<div id=\"ImgLayer\" style=\"position:absolute; z-index:1; left: 0px;\"> ");
document.writeln("<table width=\"200\" height=\"150\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"background-color:#F0F9FF;border:1px #235185 solid;\"><tr><td width=\"93\" rowspan=\"5\" align=\"center\"><a href=\"http:\/\/www.aspprogram.cn\" target=\"_blank\"><img border=0 src=\"http://www.aspprogram.cn/bbs/UpFile/UpFace/1.jpg\" width=\"80\" height=\"100\"><\/a><\/td><td width=\"107\" height=\"25\" class=\"t1\">昵称:aaaa<\/td><\/tr><tr><td height=\"25\" class=\"t1\">号码:8888<\/td><\/tr><tr><td height=\"25\" class=\"t1\">性别:男<\/td><\/tr><tr><td height=\"25\" class=\"t1\">年龄:25<\/td><\/tr><tr><td height=\"25\" class=\"t1\">地区:中国-上海<\/td><\/tr><tr><td colspan=\"2\" align=\"center\"><Div  style=\"border-top:1px #8CACD2 solid; width:95%\">&nbsp;<\/Div><\/td><\/tr><\/table><\/div>");
document.writeln("<\/div>");
document.writeln("<\/div>");
 
var bodyfrm = ( document.compatMode.toLowerCase()=="css1compat" ) ? document.documentElement : document.body;
var adst = document.getElementById("ShowAD").style;
adst.top = ( bodyfrm.clientHeight – 165 ) + "px";
adst.left = ( bodyfrm.clientWidth – 200 ) + "px";
function moveR() {
adst.top = ( bodyfrm.scrollTop + bodyfrm.clientHeight – 165 ) + "px";
adst.left = ( bodyfrm.scrollLeft + bodyfrm.clientWidth – 200 ) + "px";
}
setInterval("moveR();", 1);
function CloseIVR(){
adst.display=’none’;
}
</script>
[/code]

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » javascript右下解弹出广告代码
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址