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

In - Cài đặt dữ liệu cho TextArea - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Vùng nhập liệu » Cài đặt dữ liệu cho TextArea
URL: https://www.javascriptbank.com/set-textarea.html

Cài đặt dữ liệu cho TextArea © JavaScriptBank.comHiệu ứng có thể dùng để tạo dữ liệu mặc định cho một thẻ <textarea> thông qua những cú nhấn chuột.

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Vùng nhập liệu » Cài đặt dữ liệu cho TextArea
URL: https://www.javascriptbank.com/set-textarea.html



JavaScript
<SCRIPT language=javascript><!-- Original Programmed by Ira Sterbakov - irasterb@erols.com 8/5/05 --><!-- PLease keep credit in JavaScript section --><!-- May be freely used and modified - email notification would be nice -->var MessA = new Array()MessA[0] = " ";var rDe = 0;rDe++;MessA[rDe] = "This is the first message that you want to post in the text area,";rDe++;MessA[rDe] = "This is the second message that you want to post in the text area,";rDe++;MessA[rDe] = "This is the third message that you want to post in the text area,";rDe++;MessA[rDe] = "This is the fourth message that you want to post in the text area,";rDe++;MessA[rDe] = "This is the fifth message that you want to post in the text area,";</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM id=form1 name=form1><P><TEXTAREA id=ira style="FONT-WEIGHT: bold; FONT-SIZE: 18px; COLOR: yellow; BACKGROUND-COLOR: brown" name=Ira rows=5 cols=25></TEXTAREA><BR><BR><INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[0];" type=button value=Empty> <INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[1];" type=button value="Set Mess1"><INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[2];" type=button value="Set Mess2"><INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[3];" type=button value="Set Mess3"><INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[4];" type=button value="Set Mess4"><INPUT style="FONT-WEIGHT: bold; COLOR: yellow; BACKGROUND-COLOR: brown" onclick="javascript: document.form1.Ira.value = MessA[5];" type=button value="Set Mess5"> </P></FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->