美文网首页
PHP编程实战15-4

PHP编程实战15-4

作者: 海边拾贝 | 来源:发表于2015-11-09 17:19 被阅读0次
    <!--PHP编程实战-->
    <!--JSON & Ajax -->
    <!--15-4-->
    <!--基本的XMLHttpRequest(异步)-->
    <script type="text/javascript">
        var xhr = new XMLHttpRequest();
        xhr.open("GET", "animal.xml");
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                if (xhr.status == 2000) {
                    alert('success');
                }
                else {
                    alert("error");
                }
            }
        }
        xhr.send("our content");
    </script>
    

    相关文章

      网友评论

          本文标题:PHP编程实战15-4

          本文链接:https://www.haomeiwen.com/subject/iqqhhttx.html