Posted By

desmond54 on 02/17/10


Tagged

javascript


Versions (?)

Accessing form elements


 / Published in: JavaScript
 

  1. the value of a text box defined with the markup <input type="text" name="Name" /> can be accessed using the expression document.forms[0].elements["Name"].value
  2. OR
  3. <input type="button" onclick="ShowText(this.form);" />
  4. ... ShowText(f){f.elements["Name"].value}

Report this snippet  

You need to login to post a comment.