百分百源码网-让建站变得如此简单! 登录 注册 签到领金币!

主页 | 如何升级VIP | TAG标签

当前位置: 主页>网站教程>JS教程> 弹出右下角广告代码(可关闭)
分享文章到:

弹出右下角广告代码(可关闭)

发布时间:01/15 来源: 浏览: 关键词:
这是一款带关闭按钮的右下角浮动广告代码哦,并且是和款简单的js写的广告代码,可以跟随滚动条哦。

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<title>弹出右下角广告代码(可关闭)</title>
</head>

<body>
<div align="center">
  <p>
    <script >
    //download by http://www.111cn.net
 document.writeln("<div id="sc" style="position:absolute;;z-index:99999;right:0px;top:400px;width: 322px;border:1px solid #ccc;padding:1px;font-size:12px"><div style="width: 320px;text-align:center;line-height:25px;padding:1px;background: #efefef;"><span onclick="网页特效:closesc()" style="cursor:pointer;">关闭广告 close</span></div><iframe marginheight=0 marginwidth=0 noresize scrolling=no frameborder=0 src=ad/iframe.htm width=320 height=215></iframe></div>")
 function closesc(){
  document.getelementbyid("sc").innerhtml='';
  document.getelementbyid("sc").style.visibility='hidden';
  document.getelementbyid("sc").style.display='none';
 }
 settimeout("closesc();", 15000);
 
 function sc5()
 {
  document.getelementbyid("sc").style.top=(document.documentelement.scrolltop+document.documentelement.clientheight-document.getelementbyid("sc").offsetheight)+"px";
  document.getelementbyid("sc").style.left=(document.documentelement.scrollleft+document.documentelement.clientwidth-document.getelementbyid("sc").offsetwidth)+"px";
 }
 
 function scall()
 {
  sc5();
 }
 window.onscroll=scall;
 window.onresize=scall;
 window.onload=scall;
</script>
  </p>
</div>
</body>
</html>

打赏

打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

百分百源码网 建议打赏1~10元,土豪随意,感谢您的阅读!

共有6人阅读,期待你的评论!发表评论
昵称: 网址: 验证码: 点击我更换图片
最新评论

本文标签

广告赞助

能出一分力是一分吧!

订阅获得更多模板

本文标签

广告赞助

订阅获得更多模板