源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

Ajax通用模板实现代码

  • 时间:2022-02-04 09:47 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:Ajax通用模板实现代码
[u]复制代码[/u] 代码如下:
<script type="text/javascript"> var xmlHttp; function creatXMLHttpRequest() { if (window.ActiveXObject) { xmlHttp = new ActiveXObject("Microsoft.XMLHttp"); } else if (window.XMLHttpRequest) { xmlHttp = new XMLHttpRequest(); } } function startRequest() { creatXMLHttpRequest(); xmlHttp.onreadystatechange = handleStateChange; xmlHttp.open("GET", "simpleResponse.xml", true); xmlHttp.send(null); } function handleStateChange() { if (xmlHttp.readyState == 4) { if (xmlHttp.status == 200) { // document.getElementById("results").innerHTML = xmlHttp.responseText; // alert("The server replied with:" + xmlHttp.responseText); } } } </script>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部