【发布时间】:2014-10-31 18:56:24
【问题描述】:
我正在对一个 php 进行跨域调用,它返回:
response=2&count=15&id=84546379&firstname=adsa&emailstatus=
我想挑出response和id的值,但不知道怎么选,我的代码如下:
**
xhr.request({
url: "../promo_getstate2.php",
method: "POST",
data: {
email: emailaddress,
country: country,
lang: lang,
source: '1312_XMAS_dly'
}
}, function(response){
getstate = response['response'];
regID = response['id'];
console.log(getstate)
console.log(regID)
})
但它没有得到这些值。我该怎么做?
回复是:
" response=2&count=15&id=84546379&firstname=adsa&emailstatus="
**
【问题讨论】:
-
粘贴您的响应的输出,我们不知道响应的格式和值。
-
你的回复是这样的
response=2&count=15&id=84546379&firstname=adsa&emailstatus=? -
是的,它的 response=2&count=15&id=84546379&firstname=adsa&emailstatus=