右侧广告悬浮.docx

上传人:scccc 文档编号:12277989 上传时间:2021-12-03 格式:DOCX 页数:2 大小:11.27KB
返回 下载 相关 举报
右侧广告悬浮.docx_第1页
第1页 / 共2页
右侧广告悬浮.docx_第2页
第2页 / 共2页
亲,该文档总共2页,全部预览完了,如果喜欢就下载吧!
资源描述

《右侧广告悬浮.docx》由会员分享,可在线阅读,更多相关《右侧广告悬浮.docx(2页珍藏版)》请在三一文库上搜索。

1、.右侧广告悬浮+关闭(分辨率无撑版)<SCRIPT>/*广告 Start*/内页,文章页右边漂浮广告图显示function llgg()var urlArgas=document.location.href.indexOf('/zt/');/广告显示类型/广告对象属性var left='auto'var right="5px"var width="92px"var height="287px"var top="183px"var spitdl=185;/指定常量,通常是对

2、象与顶部的距离var ldImg;var jupUrl; var adTitle;if(urlArgas>0)/在专题中显示的广告 ldImg="images/right_wsr.jpg" jupUrl="/online.html" adTitle="点击咨询详情" else/在其他页面中显示的广告 ldImg="images/right_wsr.jpg" jupUrl="/online.html" adTitle="点击咨询详情"try/捕获异常/写出信息functi

3、on writeDiv()document.write("<div id='cl' style='position:absolute;cursor:pointer;z-index:1000;margin-top:3px; margin-right:3px;width:10px;height:10px;top:"+top+"right:"+right+"'><img src='images/guanbi.jpg'></div>");document.wr

4、ite("<div id='gm'style='position:absolute;left:"+left+"top:"+top+"right:"+right+"'><a href='"+jupUrl+"' target="_blank"><img id=ImgId src='"+ldImg+"' style='width:"+width+"he

5、ight:"+height+"' border='0' alt='"+adTitle+"' /></a></div>");function scrollBar()window.onscroll=function()/执行方法(入口)var yScroll; if (self.pageYOffset) yScroll = self.pageYOffset; else if (document.documentElement && document.documen

6、tElement.scrollTop) yScroll = document.documentElement.scrollTop; else if (document.body) yScroll = document.body.scrollTop; document.getElementById('cl').style.top=yScroll+parseInt(spitdl)+"px"document.getElementById('gm').style.top=yScroll+parseInt(spitdl)+"px"d

7、ocument.getElementById('cl').onclick=function()clos();function clos()/关闭方法document.getElementById('cl').style.display="none"document.getElementById('gm').style.display="none"var a=document.getElementById('cl');/是否是第一次创建if(a=null)writeDiv();scrollBar();/初始化创建catch(err)/*广告 End*/</SCRIPT>.;

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 社会民生


经营许可证编号:宁ICP备18001539号-1