posted 17 years ago
Hi,
You can do this by first obtaining the id's of the textbox and textarea tags and then assigning the value attribute of the textarea to the text box. Please see the script below:
--------------------------------------------
function transfer(){
document.getElementById("text1").value=document.getElementById("textarea1").value
}
<input type="text" id="text1" name="textbox" value="Textbox"/><p>
<textarea id="textarea1">TextArea here!!! </textarea>
<button onclck="transfer()">Submit</button>
-----------------------------------------