Many friends making Web pages often make bulletin boards, information windows, but also often to achieve full-page page and image of the scrolling display and worry, do not worry, here is a simple way to achieve scrolling display. We did not use Java. class programs to implement, nor dynamic DHTML language, but to fully utilize some of the JavaScript scripting language functions, write a few short JavaScript scripting language to achieve this function.
The original code is as follows:
<script language= "Javascript" >
<!--//Prevent error display
locate=0;
function My_scroller ()
{
if (locate!=400)
{
locate++;//value increased
Scroll (0,locate);
Cleartimeout (timer);
var timer = settimeout ("My_scroller ()", 2);//Control scrolling time
Timer
}
}
-->
</script>
<body onload= "My_scroller ()" >
Brief introduction of the author:<br><br>
Computer center <br><br> of Tritongjie Men <br><br> armed Police Engineering College
Zhang Weihua <br><br> Armed Police Engineering College graduate team <br><br><br><br><br>
<br><br><br><br><br><br>
Contact Address:<br><br>
Shanxi XI ' an armed police Engineering College Computer center <br><br> Tritongjie <br><br></body>
You can change the locate value to control the length of the display page (the original code is locate!=400), and you can modify the settimeout ("Scroller ()", 2); " "2" in to change the scrolling speed. You can make some adjustments to try each. After the program is written and saved, it needs to be debugged on the PII+PWS4.0+IE5 platform.