if(AJAX['debug']) {
var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);
s = '<root>ajaxerror<script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</script></root>';
}
看看那里错了

解决方案 »

  1.   

    if(AJAX['debug']) {
                    var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);
                    s = '<root>ajaxerror<\script type="text/javascript" reload="1">showDialog(\'Ajax Error: \\n' + error + '\');</\script></root>';
                }
    字符串中的</script>被解析成了html。</script> -> <\/script>
      

  2.   

    </script>=>
    </scr'+'ipt>
      

  3.   

    我的意思是在js里面</script>的出现最好是分开的形式
    比如'</scr' + 'ipt>'
      

  4.   

     var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, '\\n').replace(/"/g, '\\\"'), 200);这句没有问题吗? 后面的颜色都变了
      

  5.   

    var error = mb_cutstr($(ajaxframeid).contentWindow.document.body.innerText.replace(/\r?\n/g, "\n").replace(/\"/g, "\\\""), 200);
      

  6.   

    大叔,js里面斜杠也要转义吗?
    只知道C#里面反斜杠要转义,js确实不好,嘿嘿
      

  7.   

    高手继续来啊!上面的代码是discuz7。2 在include/js/common.js代码在windows7下登录出问题,点了登录没有反应。刷新上去了?什么问题啊?求高手?
      

  8.   

    1447 行提示这个没有定义$(selectId + '_ctrl')  请问要怎么改!