《(2020年)(广告传媒)用JavaScript做的漂浮的广告》由会员分享,可在线阅读,更多相关《(2020年)(广告传媒)用JavaScript做的漂浮的广告(2页珍藏版)》请在金锄头文库上搜索。
1、 关闭 var xPos = 20; var yPos = document.body.clientHeight; var step = 2; var delay = 60; var height = 0; var Hoffset = 0; var Woffset = 0; var yon = 0; var xon = 0; var pause = true; var interval; img.style.top = yPos; function changePos() width = document.body.clientWidth; height = document.body.cli
2、entHeight; 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 (yPos = (height - Hoffset) yon = 0; yPos = (height - Hoffset); if (xon) xPos =
3、xPos + step; else xPos = xPos - step; if (xPos = (width - Woffset) xon = 0; xPos = (width - Woffset); function closepiao() document.all(img).style.display = none; function stop() clearInterval(interval); function www_helpor_net() /closepiao();/注释后显示飘 img.visibility = visible; interval = setInterval(changePos(), delay); www_helpor_net();