Answers for "javascript dom input checkbox"

8

dom check a checkbox

document.getElementById("myCheck").checked = true;
Posted by: Guest on March-01-2021
0

get input type checkbox javascript

<html>
<body>

Checkbox: <input type="checkbox" id="myCheck">

<button onclick="check()">Check Checkbox</button>

<script>
function check() {
  alert(document.getElementById("myCheck").checked);
}
</script>

</body>
</html>
Posted by: Guest on July-05-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language