<body><script> var input = document.createElement('input') input.type = 'checkbox' document.body.appendChild(input) input.checked = true </script></body>