$.ajax({
async: false,
url: '/controller/action',
data: JSON.stringify({ hand: newjsonObjIte, logsql: log }),
dataType: 'json',
contentType: "application/json; charset=utf-8",
type: 'post',
success: function (data) {
// Back results
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
layer.msg("Error:" + textStatus + '-' + XMLHttpRequest.statusText + '-' + XMLHttpRequest.responseText);
}
});
/// <summary>
/// Batch newly added
/// </summary>
/// <param name="hand"></param>
/// <param name="logsql"></param>
/// <returns></returns>
public ActionResult action(List<sn_bd_hand> hand, string logsql = "")
{
string sError = "";
if (!string.IsNullOrEmpty(logsql))
logsql = CreateLogsql(logsql);
int res = snMainBLL.PlAddHand(hand, logsql, ref sError);
return Json(new { successed = res, msg = sError });
}
Use JQuery and AJAX to transfer Table data to the backend in the form of a JSON array...
Defined entity class: JSON data format passing at the front end Back end interface: ...
About Ajax front-end Json data acceptance and background data analysis Specific issues Method analysis 1. Do not add the contentType attribute Add contentType: "application/json" attribute t...
I'm doing a project with Thymeleaf recently. I always hear the words of separation of front and back ends. I have to learn about how to get the back-end json string in Thymeleaf. Here is a detailed ex...
One, AJAX Concept: Asynchronous JavaScript and XMl ① Asynchronous and synchronous: based on the communication between client and server Synchronization: The client must wait for the response from the ...
I have recently been studying this course. The course is busy. I used the time under or before going to bed to learn AJAX to pass the value. Let ’s show you a very simple model box message board...
ajax spring the key code is @RequestParam(value=“overtimeids[]”)!!!...
First look at the status before solving: The framework I use is SSM. In SpringMVC, I configured the encoding format as UTF-8. Each JSP page also used UTF-8. When it was submitted to the backgro...
Purpose: pass [1,2,3,4] such an array to the background I was struggling with this issue for a while, the first was to use the json string Later found request.args.getlist() This mentality collapsed. ...