我尝试了几件事来修复,没有任何帮助。
在服务器端脚本中,
 $array['content'] = "test";
 echo json_encode($array);
这是在javascript中工作的。但
 $array['content'] = "<p>test</p>";
 echo json_encode($array);
不工作。如果我添加任何 html 标签,它就不起作用。但他们都在 Firefox 和 chrome 中工作。
这是处理返回值的js。
 function showResponse(responseText)  {
     $('.form_result').html(responseText.formData);
      alert(responseText.formData);
 }
 function submitButton1() {
    var options = {
        beforeSubmit:  showRequest,  // pre-submit callback
        success:       showResponse,  // post-submit callback
        dataType: 'json',
        cache: false
    };
    // bind form using 'ajaxForm'
    $('#form').ajaxSubmit(options);
 }
     header("Cache-Control: no-cache, must-revalidate");
header("Expires: 0"); 
在 php 文件中添加了上述两行。
 <meta http-equiv="X-UA-Compatible" content="IE=8" />
在处理 js 的 html 文件中添加了上述内容。还是没用。
可能是什么问题呢?另外,我在 IE 中没有看到任何错误或警告。