Answers for "js input checkbox"

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
1

checkbox value

<input type="checkbox" name="vehicle1" value="Bike">

The checkbox value is 'Bike'.
Posted by: Guest on July-27-2020

Browse Popular Code Answers by Language