Edit Button Code In javascript - Javascript

How to make edit button in javascript?

Snippet Code

Rate this page :
  [ 0 votes]

Edit button is used to change or edit the content in any paragraph entered by you in the text box. The sample code to create edit button using javascript is given below.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script> $(document).ready(function() { $( "#ok" ).click(function() { $("#demotxt").prop("disabled", true); $("#ok").css('display','none'); $("#edit").css('display','block'); }); $( "#edit" ).click(function() { $("#demotxt").prop("disabled", false); $("#edit").css('display','none'); $("#ok").css('display','block'); }); }); </script> <textarea id='demotxt'>


Ask Questions

Ask Question