»
Tiếng AnhTiếng PhápTiếng Việt

In - Hộp thoại thông báo thay thế - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Vùng nhập liệu » Hộp thoại thông báo thay thế
URL: https://www.javascriptbank.com/alternating-message-text-box.html

Hộp thoại thông báo thay thế © JavaScriptBank.comVới mã này, bạn có thể đưa vào một khung nhập liệu (khung nhập liệu) các đoạn văn bản và hiển thị lần lượt chúng trên trang web.

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Vùng nhập liệu » Hộp thoại thông báo thay thế
URL: https://www.javascriptbank.com/alternating-message-text-box.html



CSS
<style type="text/css">textarea.test {  width: 350px;  height: 50;  border: none;}</style><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<script type="text/javascript">// Created by: Sandeep Gangadharan | http://sivamdesign.com/scripts/var text = 0;var message=new Array();  message[0] = "Welcome to the JavaScript Source!"  message[1] = "Tons of scripts for your Web pages"  message[2] = "Why not share your scripts with others?"  message[3] = "Be sure to come back again ..."function changeText() {  if (message.length > 0) {    document.change.descript.value=message[text];    text++;  }  if (text == 4) {text = 0; }  // change the # 4 at the left to the maximum # of message lines you want included    window.setTimeout("changeText()", 3500); }  // change the # on the left to adjust the speed of the                                               // scroll. The smaller the # the faster the speed// Multiple onload function created by: Simon Willison// http://simon.incutio.com/archive/2004/05/26/addLoadEventfunction addLoadEvent(func) {  var oldonload = window.onload;  if (typeof window.onload != 'function') {    window.onload = func;  } else {    window.onload = function() {      if (oldonload) {        oldonload();      }      func();    }  }}addLoadEvent(function() {  changeText();});</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name="change">  <textarea class="test" name="descript" wrap="virtual"></textarea></form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->