<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta name="keywords" content="JS代码,对联广告,JS广告代码,JS特效代码" />
<meta name="description" content="此代码内容为可关闭对联广告代码,属于站长常用代码,更多对联广告代码请访问脚本之家JS代码频道。" />
<title>可关闭对联广告代码_脚本之家</title>
</head>
<body style="margin:0px;">
<div align="center">
<center>
<table width="770" height="2000" border="0" cellpadding="0" cellspacing="0" bgcolor="#F4F4F4">
<tr>
<td width="100%" valign="top"><p align="center"> </p>
<p align="center"> </p>
<p align="center">代码整理:<a href="http://www.jb51.net/" target="_blank">脚本之家</a> </p>
<p align="center">*尊重他人劳动成果,转载请自觉注明出处!注:此代码仅供学习交流,请勿用于商业用途。</p>
<p align="center"></p>
<p align="center"><p>左右投放一致的可滚动对联广告代码</p></p>
<p align="center"></p></td>
</tr>
</table>
</center>
</div>
<SCRIPT LANGUAGE="JavaScript">
<!--
var showad = true;
var Toppx = 60; //上端位置
var AdDivW = 100; //宽度
var AdDivH = 300; //高度
var PageWidth = 800; //页面多少宽度象素下正好不出现左右滚动条
var MinScreenW = 1024; //显示广告的最小屏幕宽度象素
var ClosebuttonHtml = '<div align="right" style="position: absolute;top:0px;right:0px;margin:2px;padding:2px;z-index:2000;"><a href="javascript:;" onclick="hidead()" style="color:red;text-decoration:none;font-size:12px;">关闭</a></div>'
var AdContentHtml = '<div align="center" style="color:green;font-size:23pt;font-family:黑体;"> <a href="http://www.jb51.net/" target="_blank"><img src="images/duilian.jpg" width="100" height="300" border="0"></a></div>';
document.write ('<div id="Javascript.LeftDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
document.write ('<div id="Javascript.RightDiv" style="position: absolute;border: 1px solid #336699;background-color:#EEEEE2;z-index:1000;width:'+AdDivW+'px;height:'+AdDivH+'px;top:-1000px;word-break:break-all;display:none;">'+ClosebuttonHtml+'<div>'+AdContentHtml+'</div></div>');
function scall(){
if(!showad){return;}
if (window.screen.width<MinScreenW){
alert("临时提示:\n\n显示器分辨率宽度小于"+MinScreenW+",不显示广告");
showad = false;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
return;
}
var Borderpx = ((window.screen.width-PageWidth)/2-AdDivW)/2;
document.getElementById("Javascript.LeftDiv").style.display="";
document.getElementById("Javascript.LeftDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.LeftDiv").style.left=document.body.scrollLeft+Borderpx;
document.getElementById("Javascript.RightDiv").style.display="";
document.getElementById("Javascript.RightDiv").style.top=document.body.scrollTop+Toppx;
document.getElementById("Javascript.RightDiv").style.left=document.body.scrollLeft+document.body.clientWidth-document.getElementById("Javascript.RightDiv").offsetWidth-Borderpx;
}
function hidead()
{
showad = false;
document.getElementById("Javascript.LeftDiv").style.display="none";
document.getElementById("Javascript.RightDiv").style.display="none";
}
window.onscroll=scall;
window.onresize=scall;
window.onload=scall;
//-->
</SCRIPT>
</body>
</html>
可关闭 js 对联广告代码(图片非flash).zip
版权申诉
164 浏览量
2022-11-10
00:25:22
上传
评论
收藏 28KB ZIP 举报
毕业_设计
- 粉丝: 1932
- 资源: 1万+
最新资源
- (2005-2014期间)中国环境统计年鉴
- 2015高中信息技术excel操作题及素材(精品文档).xls
- SW3518S全协议快充USB Type-c接口电源模块硬件参考设计评估版硬件(原理图 +pcb)+封装库文件.zip
- 基于深度强化学习算法实现多星对区域目标观测的规划python源码+数据集+模型+超详细注释.zip
- RT1052+SDRAM(IS42S16160) +SIM7600CE(PCIE接口封装)控制板硬件(原理图+PCB)+封装库
- 2017大学英语四级词汇-excel-列表版(精品文档).xls
- 2017版国家医保药品目录(excel版)完整版.xls
- 基于STM32F103单片机设计的无刷电机控制板硬件(原理图+PCB+BOM)+MCU软件控制源码+文档资料.zip
- 肺结节检测数据集VOC+YOLO格式1186张1类别.zip
- Faster-RCNN基于知识蒸馏的目标检测模型增量深度学习方法python源码+项目运行说明.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈