What is AJAX?
AJAX = asynchronous JavaScript and XML.
AJAX is a technique for creating fast, Dynamic Web pages.
AJAX enables Web pages to be updated asynchronously by exchanging small amounts of data in the background with the server. This means that you can update a part of a webpage without reloading the entire page.
Traditional Web pages (without AJAX) if you need to update the content, you must reload the entire page surface.
There are many examples of applications that use AJAX: Sina Weibo, Google maps, happy net, and more.
Ajax defines a usage reference http://www.w3school.com.cn/jquery/ajax_ajax.asp jquery Ajax Ajax Method
Ajax foreground calls:
$.ajax ({url: "/manage/getcard", type: ' Post ', data: {"Labl": LA BL, "LabA": LabA, "Labb": Labb, "state": State, "CONFIG1": Config1, "Config2": Config2, "Config3": Config3}, Success:function (data) {//Sent after the successful return of data, after the execution success://alert (data[0].cd_id); alert (data.length); for (var i = 0; i < data.length; i++) { var GB = Data[i ].cd_rgb; var id = null;& nbsp data[i].cd_id; =   ; $ ('.Color_list '). Append (' <div id= ' resultcolor ' class= ' resultcolor ' cd_id= ' + data[i].cd_id & nbsp + ' style= ' width:100%; height:200px;backgroun D-color: ' + GB + '; margin-bottom:20px; " ></div> '); $ (". Resultcolor:eq (" + i + ")"). Click (function () { & nbsp var a = $ (this). attr ("cd_id"); }}
Receive and put back JSON in the background:
Public ActionResult Getlab (string tb_rgbr, String tb_rgbg, String tb_rgbb) { var Resultjson = new { L = Tb_lab L, A = Tb_laba, B = Tb_labb }; Return Json (Resultjson); }
ASP. NET MVC Ajax passes values to the background and puts back JSON value resolution