- <script language="javascript">
- var
- function
- if(window.ActiveXObject)
- new ActiveXObject("Microsoft.XMLHTTP");
- else if(window.XMLHttpRequest)
- new
- }
- function
- createXMLHttpRequest();
- "GET","ajax_test取二级联动的数据文件.action",true);
- function(){
- if(xmlHttp.readyState == 4 && xmlHttp.status == 200) //4表示完成 200表示无错误
- "viewText").innerHTML = xmlHttp.responseText;
- }
- null);
- }
- </script>
- <input type="button" value="测试异步通讯" onClick="startRequest()">