Questions tagged «jquery-1.5»

7
如何从jQuery.ajax获取响应状态代码?
在下面的代码中,我要做的就是从jQuery.ajax调用获取HTTP响应代码。然后,如果代码是301(永久移动),则显示“位置”响应标头: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>jQuery 301 Trial</title> <script src="http://code.jquery.com/jquery-1.5.1.min.js"></script> <script type="text/javascript"> function get_resp_status(url) { $.ajax({ url: url, complete: function (jqxhr, txt_status) { console.log ("Complete: [ " + txt_status + " ] " + jqxhr); // if (response …
230 ajax  jquery-1.5 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.