|
-
Clear function
Want to make a function to clear a text box using a button.
Here is what I have so far:
HTML:
<button onclick="clear()">Clear</button>
<form name="myForm1">
<textarea rows="4" cols="50" id="myTextArea" name="myTextArea">
</textarea>
</form>
JavaScript:
function clear() {
document.myForm1.myTextArea.value ="";
}
I don't really know what i'm doing if i'm honest. Is this close to what i need to do? I have to use JavaScript.
Thanks!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
|
Bookmarks