如何从jQuery中的ajax调用中读取响应头?

时间:2012-02-10 00:18:30

标签: jquery ajax jquery-mobile

我正在发布一个Ajax post请求,我将以下内容作为响应头:

Content-Type    application/x-www-form-urlencoded; charset=UTF-8
**Cookie**  CAKEPHP=ooec5sah43c3f2doemdhvi61q2
Host    test.domain.com
Referer http://test.domain.com/test/login.html
User-Agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
X-Requested-With    XMLHttpRequest

我想获得Cookie值。如何在jQuery中获取它?我只知道如何获得JSON。

1 个答案:

答案 0 :(得分:1)

查看getResponseHeader()方法

相关问题