1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > html漂浮图片代码关闭 js带关闭按钮的网页漂浮广告代码

html漂浮图片代码关闭 js带关闭按钮的网页漂浮广告代码

时间:2024-02-10 13:21:40

相关推荐

html漂浮图片代码关闭 js带关闭按钮的网页漂浮广告代码

html

head

-="-Type"=";=GBK"

带关闭按钮的网页漂浮广告代码

body

divid="img"style="position:absolute;left:311;top:815;visibility:hidden;"οnmοuseοver="clearInterval(interval)"οnmοuseοut="interval=setInterval('changePos()',delay)"align="right"

imgborder="0"src="/home/web/p_w_picpaths/Flogo.png"οnlοad="returnimgzoom(this,600);"οnclick="javascript:window.open(this.src);"style="cursor:pointer;"/

spanstyle="CURSOR:hand;color:red;font-weight:bold"οnclick="clearInterval(interval);img.style.visibility='hidden'"X/span

/div

scriptlanguage=javascript

varxPos=20;//

varyPos=document.body.clientHeight;

varstep=1;

vardelay=30;

varheight=0;

varHoffset=0;

varWoffset=0;

varyon=0;

varxon=0;

varpause=true;

varinterval;

img.style.top=yPos;

functionchangePos(){

width=document.body.clientWidth;

height=document.body.clientHeight;

Hoffset=img.offsetHeight;

Woffset=img.offsetWidth;

img.style.left=xPos+document.body.scrollLeft;

img.style.top=yPos+document.body.scrollTop;

if(yon){

yPos=yPos+step;

}

else{

yPos=yPos-step;

}

if(yPos0){

yon=1;

yPos=0;

}

if(yPos=(height-Hoffset)){

yon=0;

yPos=(height-Hoffset);

}

if(xon){

xPos=xPos+step;

}

else{

xPos=xPos-step;

}

if(xPos0){

xon=1;

xPos=0;

}

if(xPos=(width-Woffset)){

xon=0;

xPos=(width-Woffset);

}

}

functionstart(){

img.style.visibility="visible";

interval=setInterval('changePos()',delay);

}

start();

/script

/body

/html

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。