xmbaozi
2013-06-21 17:23:22 +08:00
后端返回数据时应设成`text/json` 还是一样。
在控制台执行这个,
$.get("user.php?act=send_mobi_veri&mobile=1",function(data){
alert('a');
});
返回一下错误
Uncaught TypeError: Object function () {
var a = ['{'], // The array holding the text fragments.
b, // A boolean indicating that a comma is required.
k, // The current key.
v; // The current value.
function p(s) {
// p accumulates text fragment pairs in an array. It inserts a comma before all
// except the first fragment pair.
if (b) {
a.push(',');
}
a.push(k.toJSONString(), ':', s);
b = true;
}
// Iterate through all of the keys in the object, ignoring the proto chain.
for (k in this) {
if (this.hasOwnProperty(k)) {
v = this[k];
switch (typeof v) {
// Values without a JSON representation are ignored.
case 'undefined':
case 'function':
case 'unknown':
break;
// Serialize a JavaScript object value. Ignore objects that lack the
// toJSONString method. Due to a specification error in ECMAScript,
// typeof null is 'object', so watch out for that case.
case 'object':
if (this !== window)
{
if (v) {
if (typeof v.toJSONString === 'function') {
p(v.toJSONString());
}
} else {
p("null");
}
}
break;
default:
p(v.toJSONString());
}
}
}
// Join all of the fragments together and return.
a.push('}');
return a.join('');
} has no method 'test'