Jquery returns the json Array. normally in firefox, the corresponding values of two key values are lost in chrome... Why... {"Errcode": 1, "data": {"name": {"103_0": "11111", "id": "103", "vkey ": "103_0"}, "key": {"11111": "103_0"}, "file": {"": null}, "url ":{"": null }}---- json obtained in chrome
Json obtained in firefox
{"Errcode": 1, "data": {"name": {"pai_293": "\ u5b66 \ u4e60 \ u5b66 \ u4e60 \ u5b66 \ u4e60 \ u4e0b ", "id": "104", "vkey": "104_293"}, "key": {"\ u5b66 \ u4e60 \ u5b66 \ u4e60 \ u5b66 \ u4e60 \ u4e0b ": "maid"}, "file": {"293": "award-46696.jpg"}, "url": {"293": "http: \ // hr.ryanren.dev.aifang.com \/upload \/train \/award \/award-46696.jpg "}}}
Jquery:
Function add_award (award_name, file_id ){
JQuery. ajax ({
Url: award,
Data :{
'Name': award_name,
'Type': 'Add ',
'File _ id': file_id,
'Prof _ id': pro_id,
},
Type: 'post ',
Async: false,
DataType: 'json ',
Success: function (mydata ){
Console. log (mydata );
Var str =''+ Award_name +''+ Mydata. data. file [file_id] +'
';
$ ("# Info_award"). append (str );
$ ("# Pro_award"). val ('');
$ ("# Upload_icon"). val ('');
},
Error: function (){
Alert ("error occurred. please refresh the page and try again! ");
}
});
} Reply to discussion (solution)
The two json fields you provided are not the same.
How can we know what is missing?
The two json fields you provided are not the same.
How can we know what is missing? I have discovered the root cause of the problem... Thank you.