Javascript: unterminated string literal解決方法

Javascript使用document.write(str)進行輸出時,常提示下列錯誤:Error: unterminated string literal。 一般緣由是輸出字符str中包含換行符致使的。 解決方法以下: asp: str=replace(str,vbcrlf,"",1,-1,1) php: $str = str_replace("/n", "", $str); $str = s
相關文章
相關標籤/搜索