javascript - Getting the input tag(s) and setting them as unchecked -


i want write java script function input tag(s) type "checkbox" td , mark them unchecked. following jsp code:

<td id="uncheckedbydefault" align=center class=listtypeone>     <% if (priv.getviewprivilege() == 1) { %>     <input name="view" type="checkbox" value='<%= priv.getattributeid() %>' checked>                          <% } else { %>     <input name="view" type="checkbox" value='<%= priv.getattributeid()%>'>     <% } %> </td> 

now here td has id="uncheckedbydefault". want input tag(s) , set them unchecked. can tell how can that. in advance.

try:

inputs = document.getelementbyid('uncheckedbydefault').getelementsbytagname('input');      (index = 0; index < inputs.length; ++index) {         // deal inputs[index] element.        inputs[index].checked=false;     } 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -