作者benn0106 (...)
看板Ajax
标题[问题] javascript显示中文?
时间Thu Dec 6 20:19:51 2007
我自己打了一段javascript,如下
function A(){
document.write("<p>中文</p>");
}
结果要存档时丢了一个错误给我
"some characters cannot be mapped using ISO-8859-1 character encoding.
Either change the encoding or remove the characters which are no supported by
the ISO-8859-1 character encoding."
原因我在猜是不是我把引用这个function A()的HTML档案上面,加了
<meta
http-equiv="Content-Script-Type" content="text/javascript; charset=big5" />
这一行
因为之前HTML一直无法显示中文,我才把charset设定为big5的!
ps.我是用Eclipse编辑javascript~
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.121.128.76
1F:推 fillano:滑鼠右键选档案->内容->改编码试试看。 12/07 13:36