asp.net实现滚动新闻

来源:互联网 发布:扫描仪软件 编辑:程序博客网 时间:2024/06/11 05:44
 <div id="FloatDIV" style="position: absolute;top: 0px; border-right: activeborder 1px solid; border-top: activeborder 1px solid; border-left: activeborder 1px solid; border-bottom: activeborder 1px solid; z-index:9999">      <a href="http://wwww.baidu.com" target="_blank"><img style="border:none;" src="Image/广告.jpg" /></a>  </div>


 <script type="text/javascript">    var MarginLeft = 10;    //浮动层离浏览器右侧的距离   var MarginTop = 190;   //浮动层离浏览器顶部的距离   var Width = 100;            //浮动层宽度   var Heigth= 100;           //浮动层高度     //设置浮动层宽、高   function Set()   {       document.getElementById("FloatDIV").style.width = Width + 'px';       document.getElementById("FloatDIV").style.height = Heigth + 'px';  }     //实时设置浮动层的位置   function Move()   {       var b_top = window.pageYOffset                  || document.documentElement.scrollTop                   || document.body.scrollTop                   || 0;         var b_width= document.body.clientWidth;       document.getElementById("FloatDIV").style.top = b_top + MarginTop + 'px';       document.getElementById("FloatDIV").style.left = b_width - Width - MarginLeft + 'px';      setTimeout("Move();",100);   }   function showservicepeople()   {        location.href='在线客服.aspx';   }      Set();   Move();   </script> 


0 0