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> <form id="myForm" accept-charset="ISO-8859-1"> First name: <input type="text" name="fname" value="Donald"><br> Last name: <input type="text" name="lname" value="Duck"><br> </form> <p>Click the button to change the value of the accept-charset attribute in the form element.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("myForm").acceptCharset = "UTF-8"; document.getElementById("demo").innerHTML = "The character-set was changed from ISO-8859-1 to UTF8."; } </script> </body> </html>