Prev Demo
Automatic Checking And Unchecking Chec Box By Using Javascript Code In HTML.
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <form> <h1>Checked Checkboxes automatically using JavaScript in HTML.</h1> <input type="checkbox" id="Check" /> <input type="button" value="Check" onclick="myCheck()" /> <input type="button" value="Uncheck" onclick="myUncheck()" /> </form> <script> function myCheck() { document.getElementById("Check").checked = true; } function myUncheck() { document.getElementById("Check").checked = false; } </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output