W3School TIY Editor
W3School 在线教程
改变方向
暗黑模式
运行代码
<html> <head> <script type="text/javascript"> function showCharset() { var x=document.getElementById("myForm") alert(x.acceptCharset) } </script> </head> <body> <form id="myForm" acceptCharset="ISO-8859-1"> Text: <input type="text" value="Hello World!"> <input type="button" onclick="showCharset()" value="Show charset"> </form> </body> </html>