Betty_S Posted March 18, 2007 Share Posted March 18, 2007 Hi,Believe you me, I triad to find the answer myself because its really shouldn’t be a big deal but I just couldn’t clean the text of the my textarea tag.I triad document.formName.textareaName.value=’’;document.getElementById(“textareaId”).value=””; But it failedWhat to do?Thanks. Link to comment Share on other sites More sharing options...
Lulzim Posted March 19, 2007 Share Posted March 19, 2007 I think there is a problem with the quotesyou should use " " or ' ' instead of ”” and ’’also the textarea should have an id by which you can use getElementByIdhere is an example <html><body><textarea id='test'>aksjdhkajhdjkas</textarea><br><input type='button' onclick="document.getElementById('test').value='';" value='clear'></body></html> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now