网页刷新的js 对联广告代码

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">
不可以实现,等到以后有时间了修改成可以兼容的

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值