JSFiddle - React, Tailwind, and code Playground
by Emil Hemdal
HTML
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<input type="checkbox" id="checkbox" />
<button type="button" onclick="change();">Change</button>
</body>
</html>
JavaScript
function change() {
document.getElementById("checkbox").checked=true;
}