This is the code. you must change the format of dataType to html to obtain the data. Otherwise, the error error200 will be reported. $. Ajax ({code...} is the code. you must change the dataType format to html to obtain the data. otherwise, error 200 is reported. $. Ajax ({
type:"POST", async:false, url:"
generateURL('Film.Index', array('save'));?>", data:dataparam, dataType:"json", success:function(msg){
Reply content:
This is the code. you must change the format of dataType to html to obtain the data. otherwise, error 200 is returned. $. Ajax ({
type:"POST", async:false, url:"
generateURL('Film.Index', array('save'));?>", data:dataparam, dataType:"json", success:function(msg){
Set the header on the server. no output is allowed before the header.
header('Content-type: application/json');
Data assembled by the server
echo json_encode($var);
This is because your server did not return your expected JSON format. you can print the output on the server.
That is, the data returned by the server is not in json format, not the front-end.