How To Disable Form Tag or Element In javascript

29 views

for disable any element inside or outside form just make disabled attribute to true

disabled=”true”

  1. <script type="text/javascript">
  2. function enableField(action,button)
  3. {
  4. document.form1.name.disabled=action;
  5. }</script>
  6. <form name="form1">
  7. <div id="demo_of_post">
  8. <input name="name" type="type" value="textbox" />
  9. <input id="enable_disable_text" onclick="enableField(true,’Enable’)" name="enable_disable_text" type="button" value="Disable" /></div>
  10. </form>



« Calculator in javascript Add To Bookmark In Javascript »
Posted on Tuesday, April 7th, 2009 at 4:58 pm under Javascript | RSS 2.0 Feed

Post Comment

You must be logged in to post a comment.



ComputerEducationWorld.com All Rights Reserved © RSS | CBSE | Education Boards Of India | What is My IP?