本文实例讲述了javascript获取网页支持表单字符集的方法。分享给大家供大家参考。具体如下:
javascript获取网页支持表单的字符集可通过表单的acceptcharset方法获得
first name:
last name:
the value of the accept-charset attribute is:
上面的代码输出:
the value of the accept-charset attribute is:iso-8859-1
希望本文所述对大家的javascript程序设计有所帮助。