试试转成编码输出<script language="javascript">
document.write("\u8BD5\u8BD5")
</script>得到编码的方法就一句话<script language="javascript">
document.write(escape("试试"))
</script>

解决方案 »

  1.   

    charset Property  Internet Development Index --------------------------------------------------------------------------------Sets or retrieves the character set used to encode the object.What's New for Microsoft® Internet Explorer 6
    This property now applies to the a, link, and script objects. SyntaxHTML N/A 
    Scripting object.charset [ = sCharSet ] Possible ValuessCharSet String that specifies or receives the character set. The property is read/write. The property has no default value.ResFor a, link, and script objects, you must set the value of this property before you can retrieve it.Standards Information
    这个貌似是在IE6才支持的....并且...比如说你当前页面是
    utf-8编码你要引用一个gb2312编码的文件..
    那么
    <script type="text/javascript" src="gb2312.js" charset="gb2312"></script>
    要这么写才可以.就好比,你要在一个about:blank的iframe里,document.write一个,script标记.
    因为about:blank的iframe里..默认编码是utf-8的,所以,加一个charset,标记,你要插入的script标记引用的文件编码
    这样就不会出问题了.
      

  2.   

    muxrwc:
       谢谢!原来IE6不支持这个属性啊。
    hbhbhbhbhb1021:
       这个方法我知道,但是如果这样处理的话, 存放字符串的test.js的文件就太大了。我是做多语言国际化用的。
    还有没有其他办法。
      

  3.   

    找了N久,看来只能用escape()/unescape()的方法了。