JS对联广告(IE,FireFox)

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
</head>

<body>
<table align="center" width="80%" height="1000" border="1">
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>

 

<!--
=   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *  
*     作 者:  我本有心
=     QQ:      381584252
*      E - Mail: hztgcl1986@ 163 .com
=      转载请注明出处及作者!
*      版权所有,侵权必究!!!
=
*     http: // www.8848so.com,人物搜索,8848So    
=   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *   =   =   *  
-->
< script language = " javascript " >
document.write(
" <div id='adLeft' style='position:absolute;visibility:visible;z-index:1'><img src='/Images/Close.gif' alt='关闭广告' border='0' οnclick='closeDiv();' /><br /><a href='http://www.8848so.com' target='_blank'><img src='/Images/adLeft.jpg' alt='左' border='0' /></a></div> " );
document.write(
" <div id='adRight' style='position:absolute;visibility:visible;z-index:1'><img src='/Images/Close.gif' alt='关闭广告' border='0' οnclick='closeDiv();' /><br /><a href='http://www.8848so.com' target='_blank'><img src='/Images/adRight.jpg' alt='右' border='0'></a></div> " );

var  adLeft  =  document.getElementById( " adLeft " );
var  adRight  =  document.getElementById( " adRight " );

function  scrollDiv() 
{
    
var  leftRightEdgeDistance  =   5 //  左、右边距,px
     var  topEdgeDistance  =   150 // 上边距,px
 
    
var  htmlScrollTop  =  document.documentElement.scrollTop;
    
var  htmlClientWidth  =  document.documentElement.clientWidth;
    
var  topEdgeDistance  =  htmlScrollTop  +  topEdgeDistance;
 
    adLeft.style.top 
=  topEdgeDistance  +   " px " ;
    adLeft.style.left 
=  leftRightEdgeDistance  +   " px " ;
 
    adRight.style.top 
=  topEdgeDistance  +   " px " ;
    adRight.style.left 
=  (htmlClientWidth  -  adRight.clientWidth  -  leftRightEdgeDistance)  +   " px " ;
}

function  closeDiv()
{
    adLeft.style.visibility 
=   " hidden " ;
    adRight.style.visibility 
=   " hidden " ;
}
window.onscroll 
=  scrollDiv;
</ script >

 

</body>
</html>
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值