I am very new to javascript, and am to write a page that has a text area where a user can type in some text. The context needs to be stored in a local variable in a closure. When this closure is called, the text area is reverted back to that saved state. Also, when the user presses the "save" button, a new button appears that shows the timestamp of the saved data. When the button is pressed, the function for this save point is called, and the text is restored.
I'm stumped on this.... and not sure where to start. I have added a variable in a saveText function to store the input text. Any help or direction wou开发者_开发问答ld be much appreciated!
Maybe something like http://jsfiddle.net/1nv151b13b0b/pWBdw/1/
精彩评论