Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <p>Clear the input field when you click on the button:</p> <button onclick="document.getElementById('myInput').value = ''">Clear input field</button> <input type="text" value="Blabla" id="myInput"> </body> </html>