网页刷新的js 对联广告代码
2008-03-02 16:11
681 查看
history.go(0);
location.reload();
location=location;
location.assign(location);
document.execCommand('Refresh');
window.navigate(location);
location.replace(location);
document.URL=location.href;
var lastScrollY=0;
startShow();
function showLeftImageDiv(div,pos,posPX,topPx)
{
document.write("<div id="" + div + "" style="" + pos + ":" + posPX + "px;POSITION:absolute;TOP:" + topPx + "px;">");
document.write("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"");
document.write("codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="300">");
document.write("<param name="movie" value="http://wd.gyyx.cn/flash/200801251.swf">");
document.write("<param name="quality" value="high">");
document.write("<embed src="http://wd.gyyx.cn/flash/200801251.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"");
document.write("type="application/x-shockwave-flash" width="100" height="350"></embed>");
document.write("</object>");
document.write("</div>");
}
function showRightImageDiv(div,pos,posPX,topPx)
{
document.write("<div id="" + div + "" style="" + pos + ":" + posPX + "px;POSITION:absolute;TOP:" + topPx + "px;">");
document.write("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"");
document.write("codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="300">");
document.write("<param name="movie" value="http://wd.gyyx.cn/flash/200801252.swf">");
document.write("<param name="quality" value="high">");
document.write("<embed src="http://wd.gyyx.cn/flash/200801252.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"");
document.write("type="application/x-shockwave-flash" width="100" height="350"></embed>");
document.write("</object>");
document.write("</div>");
}
function startShow()
{
showLeftImageDiv("smilediv1","left",10,10);
showRightImageDiv("smilediv2","right",10,10);
window.setInterval(scrollImage,1);
}
function scrollImage()
{
var diffY,percent;
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.smilediv1.style.pixelTop+=percent;
document.all.smilediv2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
要<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">才可以,
用这个<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
不可以实现,等到以后有时间了修改成可以兼容的
location.reload();
location=location;
location.assign(location);
document.execCommand('Refresh');
window.navigate(location);
location.replace(location);
document.URL=location.href;
var lastScrollY=0;
startShow();
function showLeftImageDiv(div,pos,posPX,topPx)
{
document.write("<div id="" + div + "" style="" + pos + ":" + posPX + "px;POSITION:absolute;TOP:" + topPx + "px;">");
document.write("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"");
document.write("codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="300">");
document.write("<param name="movie" value="http://wd.gyyx.cn/flash/200801251.swf">");
document.write("<param name="quality" value="high">");
document.write("<embed src="http://wd.gyyx.cn/flash/200801251.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"");
document.write("type="application/x-shockwave-flash" width="100" height="350"></embed>");
document.write("</object>");
document.write("</div>");
}
function showRightImageDiv(div,pos,posPX,topPx)
{
document.write("<div id="" + div + "" style="" + pos + ":" + posPX + "px;POSITION:absolute;TOP:" + topPx + "px;">");
document.write("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"");
document.write("codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100" height="300">");
document.write("<param name="movie" value="http://wd.gyyx.cn/flash/200801252.swf">");
document.write("<param name="quality" value="high">");
document.write("<embed src="http://wd.gyyx.cn/flash/200801252.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"");
document.write("type="application/x-shockwave-flash" width="100" height="350"></embed>");
document.write("</object>");
document.write("</div>");
}
function startShow()
{
showLeftImageDiv("smilediv1","left",10,10);
showRightImageDiv("smilediv2","right",10,10);
window.setInterval(scrollImage,1);
}
function scrollImage()
{
var diffY,percent;
diffY=document.body.scrollTop;
percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.all.smilediv1.style.pixelTop+=percent;
document.all.smilediv2.style.pixelTop+=percent;
lastScrollY=lastScrollY+percent;
}
要<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">才可以,
用这个<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
不可以实现,等到以后有时间了修改成可以兼容的
相关文章推荐
- 网页JS弹出广告代码,头部,右下角,网页中漂浮,对联广告代码等大全
- 网页JS弹出广告代码,头部,右下角,网页中漂浮,对联广告代码等大全
- 不用js多浏览器兼容纯DIV/CSS对联漂浮广告代码
- 对联浮动广告JS代码不滚动不浮动的解决方法
- Js对联广告代码
- 常用网页广告代码全集-js广告代码大全-个人收藏
- js左右弹性滚动对联广告代码分享
- 对联广告JS代码效果大全
- 刷新网页每次显示不同图片的JS代码
- 最常用的五个网页JS特效代码:收藏本站、设为首页、刷新本页
- 固定在网页右下角的js广告代码
- 常用JS网页广告代码
- js 左右悬浮对联广告特效代码
- JS带关闭按钮的网页漂浮广告代码
- 网页对联广告代码效果大全
- 倒记时60刷新网页的js代码
- 常用网页广告代码全集-js广告代码大全
- js对联广告代码,兼容性高
- JS实现很实用的对联广告代码(可自适应高度)
- 对联浮动广告JS代码不滚动不浮动的解决方法