fys124974704 发表于 2013-2-7 19:16:58

暂时没解决的疑惑

var xmlHttp;function createXMLHttpRequest() { if(window.XMLHttpRequest) { //Mozilla 浏览器 xmlHttp = new XMLHttpRequest(); } else if (window.ActiveXObject) { // IE浏览器 try { xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } } function startRequest() {createXMLHttpRequest();var file = '/subsystem/sale/cuspublicsaledetail/cus/${cpsf.cusID }.xml';xmlHttp.open("POST", file, true);xmlHttp.overrideMimeType("text/html;charset=gbk"); //只支持Firfox,找不到很好的支持IE的方法xmlHttp.onreadystatechange = handleStateChange;xmlHttp.send(null);}function handleStateChange() {if(xmlHttp.readyState == 4) {if(xmlHttp.status == 200) {document.getElementById("mydiv").innerHTML = xmlHttp.responseText;}}} 
决心找出一种通用方法!找了很久,依旧没有结果!
页: [1]
查看完整版本: 暂时没解决的疑惑