A.do是下载PDF文件用的。1.“//” 注释掉的代码是不用ajax的部分,在IE,firefox下, PDF均能正常显示。
2.  使用ajax后, 在firefox下正常显示, IE不能显示但是A.do已经正常执行。
<div id="test">
<script>
function goClicked() {
//document.forms['form1'].submit();
$.ajax({
url:      "B.do",
type:    'post',
data:$("#form1").serializeArray(),
success:  function(xmlHttp){$("#test").html("");
$("#test").html(xmlHttp);
}
})}if ((navigator.appName).match(/Explorer/i) != null) {// document.write('<OBJECT CLASSID="clsid:CA8A9780-280D-11CF-A24D-444553540000" WIDTH="100%" HEIGHT="500">');
//  document.write('<PARAM NAME="SRC" VALUE="A.do"/>');
//  document.write('</OBJECT>');  $("#divTest").append('<OBJECT CLASSID="clsid:CA8A9780-280D-11CF-A24D-444553540000" WIDTH="100%" HEIGHT="500"><PARAM NAME="SRC" VALUE="A.do"/></OBJECT>');
} else {
//document.write('<EMBED src="A.do" width="100%" height="500" type="application/pdf">');
//document.write('</EMBED>');
$("#divTest").append('<EMBED src="A.do" width="100%" height="500" type="application/pdf"></EMBED>');
}
</script><div id="divTest"></div>
</div>