a

来自「AJAX and PHP: Building Responsive Web Ap」· 代码 · 共 45 行

TXT
45
字号
Comparing files smartproxyping.js and SMARTPROXYPING2.JS
***** smartproxyping.js
      // display status message
      alert("There was a problem retrieving server availability data:\n" + 
            xmlHttp.statusText);
    }
***** SMARTPROXYPING2.JS
      // display status message
      alert("Error reading server availability:\n" + xmlHttp.statusText);
    }
*****

***** smartproxyping.js
  var response = xmlHttp.responseText;
  // if the response is long enough, or if it is void, we assuwe we just 
  // received a server-side error report
  if(response.length > 5 || response.length == 0)
    throw(response.length == 0 ? "Server error" : response);
  // obtain a reference to the <div> element on the page
***** SMARTPROXYPING2.JS
  var response = xmlHttp.responseText;
  // if the response is long enough, we assuwe we just received
  // a server-side error report
  if(response.length > 5)
    throw(response);
  // obtain a reference to the <div> element on the page
*****

***** smartproxyping.js
  var response = xmlHttp.responseText;
  // if the response is long enough, or if it is void, we assuwe we just 
  // received a server-side error report
  if(response.length > 5 || response.length == 0)
    throw(response.length == 0 ? "Server error" : response);
  // obtain a reference to the <div> element on the page
***** SMARTPROXYPING2.JS
  var response = xmlHttp.responseText;
  // if the response is long enough, we assuwe we just received
  // a server-side error report
  if(response.length > 5)
    throw(response);
  // obtain a reference to the <div> element on the page
*****

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?