作者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