js 输出 “,js document 输出 “,输出 “

有的时候用js再调用asp文件,当文件中含有“"”中的会出现错误

比如 document.write“<table><tr><td height="100"></td></tr></table>“

在输出高为100的时候会出现错误。



解决方法就是:转义““”js的转义字符为“\”

即document.write“<table><tr><td height=\“100\“></td></tr></table>“



js输出 " 出错