Home  >  Article  >  Backend Development  >  Why does the data returned by ajax prompt object?

Why does the data returned by ajax prompt object?

WBOY
WBOYOriginal
2016-09-29 09:19:04965browse

After running, why does the prompt result show [object Object], [object Object] instead of specific data?
This result should be like this [{title: "3333333333333"}, {title: "3333333333333"}]
Then I tried it againalert(obj.title) It prompts undefined. Why is this?

<code>$res=$xiao->field("title")->select();
$this->ajaxReturn($res);


ajax("{:U('zhuye/zhuye')}",oV1,function(str){
   var obj = eval("("+str+")");
   alert(obj);
});</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn