คำถามติดแท็ก jquery-1.5

7
วิธีรับรหัสสถานะการตอบกลับจาก jQuery.ajax
ในรหัสต่อไปนี้ทั้งหมดที่ฉันพยายามทำคือรับรหัสตอบกลับ HTTP จากการเรียก jQuery.ajax จากนั้นหากรหัสคือ 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 + …
230 ajax  jquery-1.5 
โดยการใช้ไซต์ของเรา หมายความว่าคุณได้อ่านและทำความเข้าใจนโยบายคุกกี้และนโยบายความเป็นส่วนตัวของเราแล้ว
Licensed under cc by-sa 3.0 with attribution required.