I have a textbox in my HTML file. It is basically a comment box. I want it to function such that it is in disabled state normally. But when someone clicks a ‘EDIT’ button it should allow them to modify the value in the textbox. On clicking the EDIT button, I would either like to display a new SUBMIT button or change the EDIT button to SUBMIT button itself.
Can someone give me some sample code. I know the code would be quite easy, but I am very bad with JavaScript.
Js:
Demo: http://jsfiddle.net/maniator/DKtxn/