Javascript: How to replace document.all in this case? -
in html:
<td><input type="checkbox" name="checkall" onclick="doconfirmcheckall()"></td>
...and in js:
document.all.checkall.checked = false;
i have replace construct same meaning cannot use document.all (e.g. because of unsupport in ie11).
what should use? document.getelementsbytagname("*").checkall.checked
idea?
if checkall
name
attribute, you'd use
document.getelementsbyname("checkall")[0].checked = false;
if checkall
id
attribute, you'd use
document.getelementbyid("checkall").checked = false;
Comments
Post a Comment