JavaScript翻頁程式
來源:互聯網
上載者:User
不知道你們最近忙不忙,反正我是忙得夠嗆。
要組織班上的活動,還要折騰我的新機器。(我新買的電腦,沒買音效卡,更可氣的是沒法上網)
昨天晚上看《鹿鼎記》覺得翻頁太不舒服了,自己寫了一個翻頁的,JavaScript不能對一個text/plain類型的進行scroll,只好結合ASP來做了。
Reader.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80">
<title>Text Auto Scroll Reader</title>
<base target="main">
head>
<body background="_themes/blends/blegtext.gif">
<form action="read.asp" method="post" name="test" onSubmit="init()" target="display">
檔案名稱:<input type="file" name="filename" size="15">
<input type="submit" value="View" name="b1">
<input type="button" name="b2" value="Stop" onClick="stop()">
卷滾速度:<input type="text" name="speed" value="1" size="2">
<input type="button" value="改變速度" name="b3" onClick="change()">
</form>
<script Language="JavaScript">
var y = 0
var flag = 0
var speed = 1
function init(){
setTimeout("scrolling()",2000);
flag = 1;
y = 0;
return true;
}