0
public function actionajaxSearch() {
$data_fetched=Person::model()->findByAttributes (array('Code'=>'Cust0001'));
echo CJSON::encode($data_fetched); }
$('#searchResult').live('pageshow', function(e,info)
{
$.post('?r=mobile/ajaxSearch',$('form').serialize(),
function(res)
{
arrayvalue =res;
$.each(arrayvalue, function(i, profile) {
alert(i);
alert(profile);
});
}
});
출력을 json encode로 출력하고 있습니다. 탐색 경고에서 키 또는 값이 아닌 각 문자의 값이 표시됩니다. 도움이 되었습니까?jquerymobile에서 ajax json 출력 구문 분석
이런 식으로 시도해 보셨나요? arrayvalue = res.d; 또한 arrayvalue에 도움이되는 형식을 기록하십시오. – Tamkeen