喜悦国际村 
» 游客:  注册 | 登录 | 搜索 | 统计 | 喜悦证交所 | 帮助

RSS 订阅当前论坛  

[北京]代朋友公司招聘PHP高级程序员多名

上一主题 下一主题
     
标题: 右侧漂浮广告代码  
 
fengye2751
注册会员
Rank: 2


UID 72691
精华 0
积分 130
帖子 139
金钱 130 喜悦币
威望 0
人脉 0
阅读权限 20
注册 2006-5-2
来自 上海
状态 离线
右侧漂浮广告代码

程序代码
<!--右侧漂浮广告开始 -->
<SCRIPT language="javascript">
document.write("<div id=\"piao\" style=\"background-color:#ffffff; padding:2px; border:#282D24 1px dotted; position:absolute;filter: alpha(opacity=80); \">");
document.write("<a href=http://www.dyzhu.net/><img src=http://www.upasp.cn/ad/dyzhu.gif border=0 /></a>");
document.write("<div style=\"background-color:#f6f6f6; width:100px; height:20px; line-height:22px; text-align:center;\"><a onclick=\"javascript:return closepiao();\">关闭</a></div>");
document.write("</div>");
function closepiao(){
       document.getElementById("piao").style.display="none";
}
document.getElementById("piao").style.left=((document.documentElement.clientWidth-55)-document.getElementById("piao").offsetWidth/2)+"px";
document.documentElement.onscroll=function(){
       el=document.getElementById("piao");
       el.style.top=(document.documentElement.scrollTop+30)+"px";
       el.style.left=((document.documentElement.clientWidth-55)-el.offsetWidth/2)+"px";
}
</SCRIPT>
<!--右侧漂浮广告结束 -->


近期项目中用到的修改版:

程序代码
<!--右侧漂浮广告开始 -->
<SCRIPT language="javascript">
document.write("<div id=\"piao\" style=\"padding:2px; position:absolute;filter: alpha(opacity=100); \">");
document.write("<a href=http://www.hbain.com/><img src=images/dmfree/online.gif border=0 /></a>");
//document.write("<div style=\"width:210px; height:20px; line-height:22px; text-align:center;\"><a onclick=\"javascript:return closepiao();\">关闭</a></div>");
document.write("</div>");
function closepiao(){
       document.getElementById("piao").style.display="none";
}
document.getElementById("piao").style.left=((document.documentElement.clientWidth-130)-document.getElementById("piao").offsetWidth/2)+"px";
document.documentElement.onscroll=function(){
       el=document.getElementById("piao");
       el.style.top=(document.documentElement.scrollTop+30)+"px";
       el.style.left=((document.documentElement.clientWidth-130)-el.offsetWidth/2)+"px";
}
</SCRIPT>
<!--右侧漂浮广告结束 -->
2008-5-26 12:43 PM#1
查看资料  访问主页  Blog  发短消息  QQ  ICQ 状态  Yahoo!  顶部
     


  可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题 | 开通个人空间  


 




Powered by Discuz! 6.1.0  © 2001-2010 Comsenz Inc.
Processed in 0.021091 second(s), 6 queries

(冀ICP备05009913号) 管理员:sadly 邮箱/MSN: sadly@phpx.com QQ:824008(长隐) 清除 Cookies - - Archiver - WAP