当前位置:asp编程网>技术教程>Javascript教程>  正文

javascript右下解弹出广告代码

2009-08-12 12:50:08   来源:lueidea    作者:佚名   浏览量:1788   收藏

和消息提示一样,在右下角,并且可以随着滚动条的移动而上下移动,代码如下,点击以“运行代码”可以看看效果。
[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]



关于我们-广告合作-联系我们-积分规则-网站地图

Copyright(C)2013-2017版权所属asp编程网