json (JavaScript Object Notation): lightweight data exchange (the exchanged data is converted into a platform-independent) format
Convert java objects into json strings, using ObjectMapper Class writeValueAsString(java object);
Convert a json string or an array string composed of json objects into a javascript object using the parse function provided by the javascript built-in object JSON
$.ajax() method
$.ajax({ url:请求地址(相对), type:请求类型, data:请求参数(可以字符串形式还可以是对象形式{"adminCode":"king","age":22}), dataType:服务器返回的数据类型 "json" javascript对象 "text" 文本 "html" html文档 "xml" xml文档 "script" javascript脚本, success:绑定事件处理函数 function(任意参数表示服务器返回的数据){}, error:绑定事件处理函数(服务器出错了) function(){} });
The above is the detailed content of Detailed explanation of examples of jQuery framework Ajax. For more information, please follow other related articles on the PHP Chinese website!