网页滚动对联实现

来源:互联网 发布:手机淘宝从哪里看淘龄 编辑:程序博客网 时间:2024/05/19 16:38

 <!DOCTYPE HTML PUBLIC"-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> NewDocument </TITLE>
  <META NAME="Generator"CONTENT="EditPlus">
  <META NAME="Author"CONTENT="">
  <META NAME="Keywords"CONTENT="">
  <META NAME="Description"CONTENT="">
 <scriptlanguage="javascript">
   function test(){

 document.getElementByIdx_x("sc").style.pixelTop  =document.body.scrollTop+200;
   }
   window.onscroll = test;
   function colosediv(){

 document.getElementByIdx_x("sc").style.display ="none";
   }
  </script>
 </HEAD>

 <BODY>
  <div id ="sc"style="width:100px;height:100px;backGround:red;position:absolute;top=200px;">
 <div style="float:right;"onClick="colosediv()">关闭</div>
  </div>
  下面多写几个换行。出现滚动条
 </BODY>
</HTML>

0 0
原创粉丝点击