<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>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_form_acceptcharset2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:17:12 GMT -->
</html>