jQuery API jQuery API 中英文对照版 - jQuery在线查询手册
$.getIfModified(url, params, callback)
$.getIfModified(url, params, callback)

当远程页面被修改后,用该函数通过HTTP GET请求方式装入远程页面。

返回值:XMLHttpRequest

参数:

  • url (String): 装入页面的URL地址
  • params (Map): (可选)发送到服务端的键/值对参数。
  • callback (Function):(可选) 当远程页面装入完成时执行的函数.
 

示例:

$.getIfModified("test.html");

示例:

$.getIfModified("test.html", { name: "John", time: "2pm" } );

示例:

$.getIfModified("test.cgi", function(data){ alert("Data Loaded: " + data); });

示例:

$.getifModified(
  "test.cgi",
 { name: "John", time: "2pm"   },
 function(data){
   alert("Data Loaded: " + data); 
 }
 ); 
 
$.getIfModified(url, params, callback)

Load a remote page using an HTTP GET request, only if it hasn't been modified since it was last retrieved.

Return value: XMLHttpRequest
Parameters:

  • url (String): The URL of the page to load.
  • params (Map): (optional) Key/value pairs that will be sent to the server.
  • callback (Function): (optional) A function to be executed whenever the data is loaded successfully.
 

Example:

 $.getIfModified("test.html");  

Example:

 $.getIfModified("test.html", { name: "John", time: "2pm" } );  

Example:

 $.getIfModified("test.cgi", function(data){     alert("Data Loaded: " + data);   });  

Example:

 $.getIfModified("test.cgi", 
    { name: "John", time: "2pm" },
     function(data){ 
      alert("Data Loaded: " + data); 
    }   
);