网站左右两边浮动广告JS代码

<SCRIPT language="JavaScript" src="js/flr.js"></SCRIPT>

<SCRIPT language="JavaScript" src="js/fll.js"></SCRIPT>

---------------------------flr.js------------------------------------

var imgheight

document.ns = navigator.appName == "Netscape"

window.screen.w
idth>800 ? imgheight=100:imgheight=120

function myload()

{

if (navigator.appName == "Netscape")

{document.dangdang.pageY=pageYOffset+window.innerHeight-imgheight-0;

document.dangdang.pageX=+window.innerWidth-107;

mymove();

}

else

{

dangdang.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight-0;

dangdang.style.left=document.body.offsetWidth-107;

mymove();

}

}

function mymove()

{

if(document.ns)

{

document.dangdang.top=pageYOffset+window.innerHeight-imgheight-0;

document.dangdang.left=pageXOffset+window.innerWidth-107;

setTimeout("mymove();",50)

}

else

{

dangdang.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight-0;

dangdang.style.left=document.body.scrollLeft+document.body.offsetWidth-107;

setTimeout("mymove();",50)

}

}

function MM_reload
Page(init) { //reloads the window if Nav4 resized

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true)

if (navigator.appName == "Netscape")

{

document.write("<layer id=dangdang top=300 width=80 height=80><a target='_blank'&nbsp;

href='http://images.sohu.com/cs/minisite/shouxin07/index.htm'><img border='0'&nbsp;

src='../guanggao/
8080.GIF' width='80' height='80'></a></layer>");

myload()}

else

{

document.write("<div id=dangdang style='position: absolute;width:80;top:300;left:5;visibility:

visible;z-index: 1'><a target='_blank' href='http://images.sohu.com/cs/minisite/

shouxin07/index.htm'><img border='0' src='../guanggao/8080.GIF' width='80' height='80'></a>

</div>");

myload()

}

-------------------------fll.js--------------------------------------

var imgheight

var imgleft

document.ns = navigator.appName == "Netscape"

window.screen.width>800 ? imgheight=110:imgheight=110

window.screen.width>800 ? imgleft=5:imgleft=5

function myload()

{

if (navigator.appName == "Netscape")

{document.myleft.pageY=pageYOffset+window.innerHeight-imgheight;

document.myleft.pageX=imgleft;

leftmove();

}

else

{

myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;

myleft.style.left=imgleft;

leftmove();

}

}

function leftmove()

{

if(document.ns)

{

document.myleft.top=pageYOffset+window.innerHeight-imgheight

document.myleft.left=imgleft;

setTimeout("leftmove();",80)

}

else

{

myleft.style.top=document.body.scrollTop+document.body.offsetHeight-imgheight;

myleft.style.left=imgleft;

setTimeout("leftmove();",80)

}

}

function MM_reloadPage(init) { //reloads the window if Nav4 resized

if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true)

if (navigator.appName == "Netscape")

{

document.write("<layer id=myleft top=300 width=80 height=80><a target='_blank'&nbsp;

href='http://www.polocars.com/'><img border='0' src='../guanggao/polosx-hp-mv.gif'&nbsp;

width='80' height='80'></a></layer>");

myload()}

else

{

document.write("<div id=myleft style='position: absolute;width:80;top:300;left:5;visibility:&nbsp;

visible;z-index: 1'><a target='_blank' href='http://www.polocars.com/'><img border='0'&nbsp;

src='../guanggao/polosx-hp-mv.gif' width='80' height='80'></a></div>");

myload()

}

时间: 2024-09-02 15:58:09

网站左右两边浮动广告JS代码的相关文章

兼容多浏览器右下角浮动广告js代码

兼容多浏览器右下角浮动广告js代码 var opp; var wh; var hi; var dialogright = function(title,content,height,width) {  var my = this;  this._title = title;  this._content = content;  this._height = height;  hi = height;  this._width = width;  wh = width;  this._time =

两款右下角浮动广告js代码

<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.111cn.net/1999/xhtml"> <head> <title> float message <

js实现网站最上边可关闭的浮动广告条代码_javascript技巧

本文实例讲述了js实现网站最上边可关闭的浮动广告条.分享给大家供大家参考.具体如下: 这是一款广告条代码,平时浮动在网站最上边,可关闭,设计唯美简洁,带关闭按钮,自适应网页宽度,色调明了,相信有不少朋友会喜欢的. 运行效果截图如下: 在线演示地址如下: http://demo.jb51.net/js/2015/js-top-float-clase-able-adv-codes/ 具体代码如下: <html> <head> <title>网站页首可关闭广告条</ti

网站顶部广告js代码

提示:您可以先修改部分代码再运行 网站顶部广告js代码 提示:您可以先修改部分代码再运行

jQuery 浮动广告实现代码_jquery

实现方法: 复制代码 代码如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>浮动广

浅谈网站必备品之三段JS代码的作用

在搜索引挚的算法中,所有的站长都知道蜘蛛对JS代码的识别能力有待提高,但是笔者偏偏说JS代码是网站必备品那不是违背了SEO常识吗?答案非然,一些JS代码可以会伤害网站,但是每件事都有两面性,只要是利大于弊的,大家都会把它看成是好事.所以说,使用某些JS代码对网站优化也有帮助.今天笔者谈谈三段JS代码的作用,是哪三段呢?下面成都人才网为你一一揭晓. 一.统计代码   一个不会数据分析的站长不是一个合格的站长,而网站的数据从哪里来的?当然就是统计工具啦,如果仅仅靠观察自己网站的页面点击率多少来分析,

卡巴斯基报谷歌广告js代码含木马病毒的反思

中介交易 http://www.aliyun.com/zixun/aggregation/6858.html">SEO诊断 淘宝客 云主机 技术大厅 其实卡巴斯基误报也不是第一次了,之前曾误报百度首页有木马病毒.只不过,大家对百度信任度要高一些,而这次可能很多普通网站挂有谷歌广告代码,因此在报有木马病毒时,网友肯定认为该网站含有木马病毒,而这个普通网站则未必能使网友那么信任了. 在这里我想,如果有一天当360报QQ有木马时,大家会怎么样,卸载360还是卸载QQ?从这个问题说明了什么问题呢?

浮动广告对联代码

对联|浮动|广告 <SCRIPT language=JavaScript>lastScrollY=0;function heartBeat(){ diffY=document.body.scrollTop; percent=.1*(diffY-lastScrollY); if(percent>0)percent=Math.ceil(percent); else percent=Math.floor(percent); document.all.lovexin12.style.pixelT

js 左右上下滑浮动广告条代码