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> Favorite car: <input type="button" id="myBtn" value="Volvo"> <p>Click the button below to change the text displayed on the input button above.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("myBtn").value = "BMW"; } </script> </body> </html>