jeudi 25 novembre 2021

How to capture a check box input element in Java script?

<form name="formname">
  <input type="text" maxlength="100" name="user_name" id="user_input"></input>
  <input type="checkbox" name="website_response[]" value="I really like your site" id="checkbox">I like your site</input>
  <input type="checkbox" name="website_response[]" value="One of the best site">One of the best site</input>
  <input type="checkbox" name="website_response[]" value="good site">Good Site</input>
  <input type="checkbox" name="website_response[]" value="I wish my site were good">I wish my site were good</input>
</form>

The above code conatins name attribute as an array. How do I access it in Javascript?




Aucun commentaire:

Enregistrer un commentaire