JS对联广告代码
时间:2015-06-02 21:14 来源: 作者: 阅读:次
<script type="text/javascript">
<!--对联代码开始-->
<!--
//<![CDATA[
var adLeftSrc = "images/duilian.swf" //图片地址
var adLeftFlash = "flash"
//var adLeftHref = "http://www.xybar.cn"
var adLeftWidth = 85
var adLeftHeight = 255
var adRightSrc = "images/duilian2.swf"//图片地址
var adRightFlash = "flash"
//var adRightHref = "http://ddr888.cnblogs.com/"
var adRightWidth = 85
var adRightHeight = 255
var marginTop = 155 //在这里更改距离浏览器底端的高度
var marginLeft = 15//在这里更改距离浏览器右端的高度
var navUserAgent = navigator.userAgent
function load(){
judge();
move();
}
function move() {
judge();
setTimeout("move();",80)
}
function judge(){
if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) {
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adLeftHeight - marginTop + 'px';}
if (adRightSrc != "") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adRightHeight - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
}
}
else{
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adLeftHeight - marginTop + 'px';}
if (adRightSrc != "") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adRightHeight - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
}
}
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.left = marginLeft + 'px';}
}
if (adLeftSrc != "") {
if (adLeftFlash == "flash") {
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";height:100px; font-size:12px;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_left();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adLeftWidth + ";\"><embed src=\"" + adLeftSrc + "\" quality=\"high\" width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\" type=\"application/x-shockwave-flash\"></embed></div>");
document.write("</div>");
}
else{
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";height:100px; font-size:12px;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_left();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adLeftWidth + ";\"><a href=\"" + adLeftHref +"\" target=_blank><img src=\"" + adLeftSrc + "\" width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\" border=\"0\" \></a></div>");
document.write("</div>");
}
}
if (adRightSrc != "") {
if (adRightFlash == "flash") {
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";height:100px; font-size:12px;text-align:right;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_right();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adRightWidth + ";\"><embed src=\"" + adRightSrc + "\" quality=\"high\" width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\" type=\"application/x-shockwave-flash\"></embed></div>");
document.write("</div>");
}
else{
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";height:100px; font-size:12px;text-align:right;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_right();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adRightWidth + ";\"><a href=\"" + adRightHref +"\" target=_blank><img src=\"" + adRightSrc + "\" width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\" border=\"0\" \></a></div>");
document.write("</div>");
}
}
load();
function close_float_right(){
document.getElementById("adRightFloat").style.display="none";}
function close_float_left(){
document.getElementById("adLeftFloat").style.display="none";} //]]>
-->
<!--对联代码结束-->
</script>
<!--对联代码开始-->
<!--
//<![CDATA[
var adLeftSrc = "images/duilian.swf" //图片地址
var adLeftFlash = "flash"
//var adLeftHref = "http://www.xybar.cn"
var adLeftWidth = 85
var adLeftHeight = 255
var adRightSrc = "images/duilian2.swf"//图片地址
var adRightFlash = "flash"
//var adRightHref = "http://ddr888.cnblogs.com/"
var adRightWidth = 85
var adRightHeight = 255
var marginTop = 155 //在这里更改距离浏览器底端的高度
var marginLeft = 15//在这里更改距离浏览器右端的高度
var navUserAgent = navigator.userAgent
function load(){
judge();
move();
}
function move() {
judge();
setTimeout("move();",80)
}
function judge(){
if (navUserAgent.indexOf("Firefox") >= 0 || navUserAgent.indexOf("Opera") >= 0) {
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adLeftHeight - marginTop + 'px';}
if (adRightSrc != "") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.body.clientHeight > document.documentElement.clientHeight)?document.documentElement.clientHeight:document.body.clientHeight) - adRightHeight - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.body.clientWidth > document.documentElement.clientWidth)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
}
}
else{
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adLeftHeight - marginTop + 'px';}
if (adRightSrc != "") {
document.getElementById("adRightFloat").style.top = (document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop) + ((document.documentElement.clientHeight == 0)?document.body.clientHeight:document.documentElement.clientHeight) - adRightHeight - marginTop + 'px';
document.getElementById("adRightFloat").style.left = ((document.documentElement.clientWidth == 0)?document.body.clientWidth:document.documentElement.clientWidth) - adRightWidth - marginLeft + 'px';
}
}
if (adLeftSrc != "") {document.getElementById("adLeftFloat").style.left = marginLeft + 'px';}
}
if (adLeftSrc != "") {
if (adLeftFlash == "flash") {
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";height:100px; font-size:12px;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_left();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adLeftWidth + ";\"><embed src=\"" + adLeftSrc + "\" quality=\"high\" width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\" type=\"application/x-shockwave-flash\"></embed></div>");
document.write("</div>");
}
else{
document.write("<div id=\"adLeftFloat\" style=\"position: absolute;width:" + adLeftWidth + ";height:100px; font-size:12px;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_left();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adLeftWidth + ";\"><a href=\"" + adLeftHref +"\" target=_blank><img src=\"" + adLeftSrc + "\" width=\"" + adLeftWidth + "\" height=\"" + adLeftHeight + "\" border=\"0\" \></a></div>");
document.write("</div>");
}
}
if (adRightSrc != "") {
if (adRightFlash == "flash") {
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";height:100px; font-size:12px;text-align:right;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_right();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adRightWidth + ";\"><embed src=\"" + adRightSrc + "\" quality=\"high\" width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\" type=\"application/x-shockwave-flash\"></embed></div>");
document.write("</div>");
}
else{
document.write("<div id=\"adRightFloat\" style=\"position: absolute;width:" + adRightWidth + ";height:100px; font-size:12px;text-align:right;\"><img src=\"images/close.gif\" width=\"12\" border=\"0\" height=\"12\" onMousedown=\"javascript:close_float_right();void(0);\";>");
document.write("<div id=\"Float\" style=\"width:" + adRightWidth + ";\"><a href=\"" + adRightHref +"\" target=_blank><img src=\"" + adRightSrc + "\" width=\"" + adLeftWidth + "\" height=\"" + adRightHeight + "\" border=\"0\" \></a></div>");
document.write("</div>");
}
}
load();
function close_float_right(){
document.getElementById("adRightFloat").style.display="none";}
function close_float_left(){
document.getElementById("adLeftFloat").style.display="none";} //]]>
-->
<!--对联代码结束-->
</script>
(责任编辑:admin)
相关内容
- ·“北湖印象”楼盘广告对联
- ·卖豆腐的店铺的广告对联
- ·“上书房”楼盘广告对联
- ·京城史上最强广告对联
- ·光大集团旗下楼盘广告对联小集
- ·对联广告始祖朱元璋为阉猪人写的对联广告
- ·四大才子之一的祝枝山为一萧条酒馆写的对
- ·戏园的对联广告
- ·古玩店的对联广告
- ·眼镜店的对联广告
- ·酒厂的对联广告
- ·酒馆的对联广告
- ·药店的广告对联
- ·理发店的对联广告
- ·钦州红树林大酒店对联欣赏
- ·网站常用对联广告代码
- ·对联广告代码效果
- ·居顶不随下拉条滚动的对联广告代码
- ·随下拉条滚动的对联广告代码
- ·浮动对联广告之左侧代码
- ·带关闭按钮的对联广告代码
- ·简单实用的js对联广告代码
- ·JS对联广告代码
- ·右侧滚动JS对联代码
- ·对联广告js代码
- ·纯DIV/CSS对联漂浮广告代码
- ·著名的商品对联广告欣赏
- ·js控制的对联式浮动框
- ·2011年最新广告词串联对联
- ·关于对联广告不滚动的解决方法
- ·网站漂浮对联广告代码
- ·对联浮动广告代码不滚动的解决方法
- ·用对联做广告