在网页里加入一句代码:
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>

解决方案 »

  1.   

    简体中文GB_2312
    <%@ Language=VBScript codepage=936 %>
    <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
      

  2.   

    啊 ??!!
     黄蓉,我是在servlet里写的javascript,哪有网页来写
      <meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
      

  3.   

    记得书上看到过,大至意思就是直接定义一个变量为string型的时候,有些时候会出错。
    要这样构造一个string对象试试var temp = new String("数据已经提交,谢谢你的支持!");
    alert(temp)
      

  4.   

    在servlet里面加上,试试
    private static final String CONTENT_TYPE = "text/html; charset=GBK";