jimfog Posted February 25, 2021 Share Posted February 25, 2021 I have a textarea form that the user fills to inform why he/she is closing its business...no more than 200 chars. Suppose that he goes to edit that and clicks the cancel button..in such a case whatever he/she has typed must be replaced by the original text. this original text comes from the database and must be available somehwere in the DOM(in case it is needed such as the case of cancel). I was thinking the data attr but for various reasons I do not think you can store there so much text... What are my alternatives? Link to comment Share on other sites More sharing options...
dsonesuk Posted February 25, 2021 Share Posted February 25, 2021 (edited) Any default value in a form input can be retrieved using JavaScript .defaultValue.. Edited February 25, 2021 by dsonesuk 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