• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • javascript翻頁程序

    發表于:2007-06-30來源:作者:點擊數: 標簽:
    不知道你們最近忙不忙,反正我是忙得夠嗆。 要組織班上的活動,還要折騰我的新機器。(我新買的計算機,沒買聲卡,更可氣的是沒法上網) 昨天晚上看《鹿鼎記》覺得翻頁太不舒服了,自己寫了一個翻頁的, Java Script不能對一個text/plain類型的進行scroll,只
    不知道你們最近忙不忙,反正我是忙得夠嗆。
    要組織班上的活動,還要折騰我的新機器。(我新買的計算機,沒買聲卡,更可氣的是沒法上網)
    昨天晚上看《鹿鼎記》覺得翻頁太不舒服了,自己寫了一個翻頁的,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;
        }
        function scrolling(){
            if (flag == 1) {
              parent.display.scroll(0,y);
                  y= y + speed
                  setTimeout("scrolling()",5);
            }
        }
        function stop(){
           if ( flag == 1 ) {
                flag = 0;
                document.test.b2.value = "Start";
       }
           else {
                flag = 1;
                document.test.b2.value= "Stop";
                setTimeout("scrolling()",500);
                }
          }
        function change(){
          speed = parseInt(document.test.speed.value,10);
        }
    </script>

    </body>
    </html>
    =================================================================
    Display.asp
    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80">
    <title>Text Display</title>
    </head>

    <body background="_themes/blends/blegtext.gif" bgproperties="fixed">
    <%
    Const ForReading = 1, ForWriting = 2, ForAppending = 8
    Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0
    Dim filename, fs, f, s , readf , skip , I
    filename = Request.Form("filename")
    Set fs = Server.CreateObject("Scripting.FileSystemObject")
    If fs.FileExists(filename) then
        Set f = fs.GetFile(filename)
        Set readf = f.OpenAsTextStream(ForReading,TristateFalse)  
    Else
        Response.Write(filename & "此文件不存在!")
    End if
    i = 1
    Do While readf.AtEndOfStream <> True
        S = readf.ReadLine
        Response.Write cstr(i) & "  " &  S & "<br>"
        i = i + 1
    Loop
    %>
    </body>
    </html>
      

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>