[JSP ] 有關illegal escape character

看板java作者 ( )時間16年前 (2007/11/21 16:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
小弟寫的大概是這樣 <% String alertMsg=""; if(condition){ try{ . . . alertMsg="成功"; }catch{ alertMsg="失敗"; } %> <script language='JavaScript'> alert('<%=alertMsg%>'); </script> 跑出來的錯誤是 alertMsg="$@#%@#%"; 顯示為illegal escape character 不知道有沒有什麼方法可以修正這問題? 麻煩指教<(_ _)> -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 202.173.49.133
文章代碼(AID): #17G-NW8z (java)
文章代碼(AID): #17G-NW8z (java)