jquery中ajax超时处理


[示例代码]

<html>
  <head>
    <script src="jquery-1.2.js"></script>
    <script>
      $(document).ready(
        function () {
          $.ajax({
            url: "ajax.error.php",
            timeout: 1000,
            error: function (xmlHttpRequest, error) {
              console.info(xmlHttpRequest, error);
            }
          });
        }
      );
    </script>
  </head>
</html>

 

本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3