-
1 # 使用者4346846618938
-
2 # 使用者1406488739715
後臺寫法:public String saveDeskMenu(@RequestBody DeskMenu[] menu){return "success";}前臺寫法var parameters = new Array();var parameter = {menu : {menuId : menuIdFromDataBase},targetX: targetIndex,targetY: menuIndex,userId: 12}; parameters.push(parameter);var jsonParameter = kendo.stringify(parameters);$.ajax({url: "<%=path%>/tab/saveDeskMenu.do",type: "POST",data: jsonParameter,success: function(data){alert(data);},dataType: "json",contentType: "application/json"} );
-
3 # 使用者4346846618938
$.ajax( { url:url, type: "POST", data: JSON.stringify(x), success: function(data){ }, dataType: "json", contentType: "application/json" } );@RequestBody 用這個接受你的物件引數例子public @ResponseBody String saveDocumentBook(@RequestBody 物件 x, HttpServletRequest request)
-
4 # 使用者1406488739715
後臺寫法:public String saveDeskMenu(@RequestBody DeskMenu[] menu){return "success";}前臺寫法var parameters = new Array();var parameter = {menu : {menuId : menuIdFromDataBase},targetX: targetIndex,targetY: menuIndex,userId: 12}; parameters.push(parameter);var jsonParameter = kendo.stringify(parameters);$.ajax({url: "<%=path%>/tab/saveDeskMenu.do",type: "POST",data: jsonParameter,success: function(data){alert(data);},dataType: "json",contentType: "application/json"} );
回覆列表
$.ajax( { url:url, type: "POST", data: JSON.stringify(x), success: function(data){ }, dataType: "json", contentType: "application/json" } );@RequestBody 用這個接受你的物件引數例子public @ResponseBody String saveDocumentBook(@RequestBody 物件 x, HttpServletRequest request)