Get your own website Result Size: 625 x 565
x
 
<!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 return 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() {
  var x = document.getElementById("myForm").acceptCharset;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_form_acceptcharset by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 18:16:50 GMT -->
</html>