最新附合W3C网站标准,上下滚动对联广告代码(二)


我们在网上有时候,找了好多对联广告代码,但由于不附合建站标准,放在上面,可能不会上下滚动.对些,可能有的朋友很头痛或苦恼. 还非要删除文档声明代码.但是这样,我们用Div+css写的代码会变得一团糟.

演示效果请看本站首页:http://www.sjroad.com

在你的文章中加入一个js文件和下面的代码就可以了.

<!-- 广告开始 -->
<div id="followDiv1" style="z-index: 20; position: absolute; width: 100px; height: 80px;"><img src="images/dot1.gif" style="cursor:pointer" onclick="document.getElementById('followDiv1').style.display='none'" border="0" height="12" width="98"><a href="#" target="_blank"><img src="adv/bytong.gif" border="0" /></a></div>

<div id="followDiv2" style="z-index: 20; position: absolute; width: 100px; height: 80px;"><img src="images/dot1.gif" style="cursor:pointer" onclick="document.getElementById('followDiv2').style.display='none'" border="0" height="12" width="98"><a href="#" target="_blank"><img src="adv/bytong.gif" border="0" /></a></div>
<script>setInterval("play('followDiv2','100','160','right')",10);</script>
<script>setInterval("play('followDiv1','2','160','left')",10);</script>
<!-- 广告结束 -->

JS文件,你自己下吧,地址:
用的时候,链接到当前文档就可以了.
<script type="text/javascript" src="js/ad_follow.js"></script>

地址:http://www.sjroad.com/js/ad_follow.js

希望能给网页制作的朋友有所帮助!

[本日志由 设计路上 于 2008-08-14 08:37 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: 对联 广告 代码
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.