以下为引用的内容: function postXmlHttp( submitUrl, callbackFunc ,loadFunc) { _postXmlHttpProcessPostChangeCallBack = callbackFunc; _loadingFunction = loadFunc; if(window.createRequest){ try{ _xmlHttpRequestObj=window.createRequest(); _xmlHttpRequestObj.open('POST',submitUrl,true); _xmlHttpRequestObj.onreadystatechange=postXmlHttpProcessPostChange; _xmlHttpRequestObj.send();} catch(ee){}} else if(window.XMLHttpRequest){ _xmlHttpRequestObj=new XMLHttpRequest(); _xmlHttpRequestObj.overrideMimeType('text/xml'); _xmlHttpRequestObj.open('POST',submitUrl,true); _xmlHttpRequestObj.onreadystatechange=postXmlHttpProcessPostChange; };处理POST请求 function parseSubTree(id) {var el= document.getElementById( id );//得到id var ulElmt= document.createElement("UL");//创建<ul>节点 ulElmt.innerHTML=xmlHttpRequestObj.responseText;//用文本的响应方式,赋值给innerHTML el.appendChild(ulElmt); var images = el.getElementsByTagName("IMG"); images[0].setAttribute("src", "images/minus.gif"); images[0].setAttribute("onclick", "showHide('"+id+"')"); var aTag = el.getElementsByTagName("A"); aTag[0].setAttribute("onclick", "showHide('"+id+"')");//触发单击事件 var loadDiv= document.getElementById( "load" ); loadDiv.style.display="none";//判断style属性是否显示} |