⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 009.htm

📁 javascript源码集锦
💻 HTM
字号:
<!-- saved from url=(0022)http://internet.e-mail -->
<html>
<!--以下包含此页的全部代码,作者:阿捷 有问题请email:alone@188.net-->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="Author" content="Haha,Alone,阿捷,alone@188.net">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<style>
<!--
        A:link {text-decoration: none; color: 0000FF; font-family: 新细明体}
        A:visited {text-decoration: none; color: 004080; font-family: 新细明体}
        A:active {text-decoration: none; font-family: 新细明体}
        A:hover {text-decoration: underline; color: FF0000}
-->
</style>
<script language="JavaScript">
<!--  Activate Cloaking Device

//请保留以下版权信息**************************
// Timothy's Manual Teletype Display 
// timothy@essex1.com
// T-Banner - copyright (c) 1996 by Tomer Shiran and Yehuda Shiran. 
//******************************************

// used to track position in message
   var i = 0; 
// used to cycle thru messages 
   var TextNumber = -1;
// array of messages 
   var TextInput = new Object();
// used to load manipulate message 
   var HelpText=""; 
// used to load message
   var Text = ""; 
// length of timeout (smaller is faster) 
   var Speed=50;
// used to display message number
   var message=0;
// used to position text in ver 2.0
   var addPadding="\r\n";

// Each element of TextInput represents a single message.
TextInput[0] = "“Java Bar”前身是“程序人生”,由陈锋制作"; 
TextInput[1] = "欢迎你的光临!本站为你提供大量JAVA中英文资料和程序!";
TextInput[2] = "重点是Java中文资料";
TextInput[3] = "与制作网页密切相关的技术";
TextInput[4] = "本站同时创办“Java技术讨论室”";
TextInput[5] = "专为各层次的JAVA爱好者提供在线交流场所";
TextInput[6] = "如果你喜欢JAVA,欢迎你的加入!";
TextInput[7] = "本站网址:javabar.126.com或javabar.soim.net或javabar.silversand.net";

TotalTextInput = 7; // (0, 1, 2, 3, 4, 5, 6, 7)

// Positioning and speed vary between versions.
var Version =  navigator.appVersion; 
if (Version.substring(0, 1)==3)
   {
   Speed=200;
   addPadding="";
   }

for (var addPause = 0; addPause <= TotalTextInput; addPause++) 
   {TextInput[addPause]=addPadding+TextInput[addPause];}
var TimerId
var TimerSet=false;

// Called by >>> button (display next message) .
function nextMessage() 
   {
   if (!TimerSet)
      {
      TimerSet=true;
      clearTimeout (TimerId);
      if (TextNumber>=TotalTextInput)
         { 
         alert("This is the end of the list!");
         TimerSet=false;
         }
      else
         {
         TextNumber+=1;
         message=TextNumber+1;
         document.forms[0].elements[2].value= message;
         Text = TextInput[TextNumber];
         HelpText = Text;
         }
      teletype();
      }
   }

// Gets and displays character from rollMessage() . 
// Variable Speed controls length of timeout and thus the speed of typing.
function teletype() 
   {
   if (TimerSet)
      {
      Text=rollMessage();
      TimerId = setTimeout("teletype()", Speed);
      document.forms[0].elements[0].value=Text;
      }
   }

// Pulls one character at a time from string and returns (as Text) to function teletype() for displaying.
function rollMessage () 
   {
   i++;
   var CheckSpace = HelpText.substring(i-1, i);
   CheckSpace = "" + CheckSpace;
   if (CheckSpace == " ") 
      {i++;}
   if (i >= HelpText.length+1) 
      {
      TimerSet=false;
      Text = HelpText.substring(0, i);
      i=0; 
      return (Text);
      }
   Text = HelpText.substring(0, i);
   return (Text);
   }
// Initially called by onLoad in BODY tag to load title. 
function initTeleType() 
   {
   Text="\r\n           Manual Tele-Type Display";
   document.forms[0].elements[0].value=Text;
   }
// Called by <<< button (get previous message).
function lastMessage() 
   {
   if (!TimerSet && TextNumber!=-1)
      {
      TimerSet=true;
      clearTimeout (TimerId);
      if (TextNumber<=0)
         { 
         alert("This is the beginning of the list!");
         TimerSet=false;
         }
      else 
         {
         TextNumber-=1;
         message=TextNumber+1;
         document.forms[0].elements[2].value= message;
         Text = TextInput[TextNumber];
         HelpText = Text;
         } 
      teletype(); 
      }
   }

// Deactivate Cloaking --></script>

<title>公告栏</title>
</head>

<body topmargin="0" leftmargin="0" background="bg4.gif">

<table border="0" width="100%" cellspacing="0" cellpadding="0" height="34">
  <tr>
    <td width="11%" rowspan="2" height="34"></td>
    <td width="26%" height="16"><br>
    </td>
    <td width="53%" height="16"><form>
      <table CELLSPACING="0" CELLPADDING="0" WIDTH="17%">
        <tr>
          <td width="100%" colspan="3" valign="top"><textarea NAME="teletype" ROWS="3" COLS="28"
          wrap="yes"></textarea> </td>
        </tr>
        <tr align="center">
          <td width="40%" valign="top" bgcolor="#FFFFFF"><input TYPE="button" VALUE="公告栏"
          onClick="lastMessage()"></td>
          <td width="30%" bgcolor="#FFFFFF" valign="top"><input TYPE="text" value="共8条" SIZE="5"
          name="1"></td>
          <td width="30%" bgcolor="#FFFFFF" align="top"><input TYPE="button" VALUE="阅  读"
          onClick="nextMessage()"></td>
        </tr>
      </table>
    </form>
    </td>
    <td width="10%" height="16"></td>
  </tr>
  <tr>
    <td width="79%" height="18" colspan="2" bgcolor="#FFFFFF">这个好复杂的,有兴趣的话慢慢研究:<p><font
    color="#FF0000">&lt;script language=&quot;JavaScript&quot;&gt;<br>
    &lt;!-- Activate Cloaking Device<br>
    <br>
    //请保留以下版权信息**************************<br>
    // Timothy's Manual Teletype Display <br>
    // timothy@essex1.com<br>
    // T-Banner - copyright (c) 1996 by Tomer Shiran and Yehuda Shiran. <br>
    //******************************************<br>
    <br>
    // used to track position in message<br>
    var i = 0; <br>
    // used to cycle thru messages <br>
    var TextNumber = -1;<br>
    // array of messages <br>
    var TextInput = new Object();<br>
    // used to load manipulate message <br>
    var HelpText=&quot;&quot;; <br>
    // used to load message<br>
    var Text = &quot;&quot;; <br>
    // length of timeout (smaller is faster) <br>
    var Speed=50;<br>
    // used to display message number<br>
    var message=0;<br>
    // used to position text in ver 2.0<br>
    var addPadding=&quot;\r\n&quot;;<br>
    <br>
    // Each element of TextInput represents a single message.<br>
    TextInput[0] = &quot;“Java Bar”前身是“程序人生”,由陈锋制作,&quot;; 
    <br>
    TextInput[1] = &quot;欢迎你的光临!本站为你提供大量JAVA中英文资料和程序!&quot;;<br>
    TextInput[2] = &quot;重点是Java中文资料&quot;;<br>
    TextInput[3] = &quot;与制作网页密切相关的技术&quot;;<br>
    TextInput[4] = &quot;本站同时创办“Java技术讨论室”&quot;;<br>
    TextInput[5] = &quot;专为各层次的JAVA爱好者提供在线交流场所&quot;;<br>
    TextInput[6] = &quot;如果你喜欢JAVA,欢迎你的加入!&quot;;<br>
    TextInput[7] = &quot;本站网址:javabar.126.com或javabar.soim.net或javabar.silversand.net&quot;;<br>
    <br>
    TotalTextInput = 7; // (0, 1, 2, 3, 4, 5, 6, 7)<br>
    <br>
    // Positioning and speed vary between versions.<br>
    var Version = navigator.appVersion; <br>
    if (Version.substring(0, 1)==3)<br>
    {<br>
    Speed=200;<br>
    addPadding=&quot;&quot;;<br>
    }<br>
    <br>
    for (var addPause = 0; addPause &lt;= TotalTextInput; addPause++) <br>
    {TextInput[addPause]=addPadding+TextInput[addPause];}<br>
    var TimerId<br>
    var TimerSet=false;<br>
    <br>
    // Called by &gt;&gt;&gt; button (display next message) .<br>
    function nextMessage() <br>
    {<br>
    if (!TimerSet)<br>
    {<br>
    TimerSet=true;<br>
    clearTimeout (TimerId);<br>
    if (TextNumber&gt;=TotalTextInput)<br>
    { <br>
    alert(&quot;This is the end of the list!&quot;);<br>
    TimerSet=false;<br>
    }<br>
    else<br>
    {<br>
    TextNumber+=1;<br>
    message=TextNumber+1;<br>
    document.forms[0].elements[2].value= message;<br>
    Text = TextInput[TextNumber];<br>
    HelpText = Text;<br>
    }<br>
    teletype();<br>
    }<br>
    }<br>
    <br>
    // Gets and displays character from rollMessage() . <br>
    // Variable Speed controls length of timeout and thus the speed of typing.<br>
    function teletype() <br>
    {<br>
    if (TimerSet)<br>
    {<br>
    Text=rollMessage();<br>
    TimerId = setTimeout(&quot;teletype()&quot;, Speed);<br>
    document.forms[0].elements[0].value=Text;<br>
    }<br>
    }<br>
    <br>
    // Pulls one character at a time from string and returns (as Text) to function teletype() 
    for displaying.<br>
    function rollMessage () <br>
    {<br>
    i++;<br>
    var CheckSpace = HelpText.substring(i-1, i);<br>
    CheckSpace = &quot;&quot; + CheckSpace;<br>
    if (CheckSpace == &quot; &quot;) <br>
    {i++;}<br>
    if (i &gt;= HelpText.length+1) <br>
    {<br>
    TimerSet=false;<br>
    Text = HelpText.substring(0, i);<br>
    i=0; <br>
    return (Text);<br>
    }<br>
    Text = HelpText.substring(0, i);<br>
    return (Text);<br>
    }<br>
    // Initially called by onLoad in BODY tag to load title. <br>
    function initTeleType() <br>
    {<br>
    Text=&quot;\r\n Manual Tele-Type Display&quot;;<br>
    document.forms[0].elements[0].value=Text;<br>
    }<br>
    // Called by &lt;&lt;&lt; button (get previous message).<br>
    function lastMessage() <br>
    {<br>
    if (!TimerSet &amp;&amp; TextNumber!=-1)<br>
    {<br>
    TimerSet=true;<br>
    clearTimeout (TimerId);<br>
    if (TextNumber&lt;=0)<br>
    { <br>
    alert(&quot;This is the beginning of the list!&quot;);<br>
    TimerSet=false;<br>
    }<br>
    else <br>
    {<br>
    TextNumber-=1;<br>
    message=TextNumber+1;<br>
    document.forms[0].elements[2].value= message;<br>
    Text = TextInput[TextNumber];<br>
    HelpText = Text;<br>
    } <br>
    teletype(); <br>
    }<br>
    }<br>
    <br>
    // Deactivate Cloaking --&gt;&lt;/script&gt;<br>
    </font></p>
    <p><font color="#FF0000">&lt;form&gt;<br>
    &lt;table CELLSPACING=&quot;0&quot; CELLPADDING=&quot;0&quot; WIDTH=&quot;17%&quot;&gt;<br>
    &lt;tr&gt;<br>
    &lt;td width=&quot;100%&quot; colspan=&quot;3&quot; valign=&quot;top&quot;&gt;&lt;div 
    align=&quot;center&quot;&gt;&lt;p&gt;&lt;textarea NAME=&quot;teletype&quot; 
    ROWS=&quot;3&quot; COLS=&quot;28&quot; wrap=&quot;yes&quot;&gt;&lt;/textarea&gt; 
    &lt;/td&gt;<br>
    &lt;/tr&gt;<br>
    &lt;tr align=&quot;center&quot;&gt;<br>
    &lt;td width=&quot;40%&quot; valign=&quot;top&quot; 
    bgcolor=&quot;#0000A0&quot;&gt;&lt;input TYPE=&quot;button&quot; VALUE=&quot;公告栏&quot; 
    onClick=&quot;lastMessage()&quot;&gt;&lt;/td&gt;<br>
    &lt;td width=&quot;30%&quot; bgcolor=&quot;#0000A0&quot; 
    valign=&quot;top&quot;&gt;&lt;input TYPE=&quot;text&quot; value=&quot;共8条&quot; 
    SIZE=&quot;5&quot; name=&quot;1&quot;&gt;&lt;/td&gt;<br>
    &lt;td width=&quot;30%&quot; bgcolor=&quot;#0000A0&quot; 
    valign=&quot;top&quot;&gt;&lt;input TYPE=&quot;button&quot; VALUE=&quot;阅 读&quot; 
    onClick=&quot;nextMessage()&quot;&gt;&lt;/td&gt;<br>
    &lt;/tr&gt;<br>
    &lt;/table&gt;<br>
    &lt;/form&gt;</font></p>
    <p> </td>
    <td width="10%" height="18"></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -