This json format is correct, but the callback function cannot execute [{id: 4, type_name: Galaxy & nbsp; Note2, sid: v4}, {id: 12, type_name: ascend & nbsp; P6, sid: v12}] this is the data in the generated json format. the format is correct. The json format of adding Model function & nbsp; show_m is correct, however, the callback function cannot be executed.
[{"id":"4","type_name":"Galaxy Note2","sid":"v4"},{"id":"12","type_name":"Ascend P6","sid":"v12"}]
This is the data in json format generated. the format is correct.
// Add models
Function show_mobiletype (modelid, id ){
$. GetJSON ("? M = content & c = content & a = mobile_getjson_ids & modelid = "+ modelid +" & id = "+ id, function (json ){
Alert (json );
Var newrelation_ids = '';
If (json = null ){
Alert ('No related articles added ');
Return false;
}
$. Each (json, function (I, n ){
Newrelation_ids + ="
· "+ N. type_name +"";
});
(('{Lele_type_text'{.html (newrelation_ids );
});
}
However, the callback function is not executed.
------ Solution --------------------
Alert (newrelation_ids );
No problem. check other places
Whether it is the impact of the BOM header should also be considered
------ Solution --------------------
That's because you didn't call the method according to the rules.