How can we post a complete HTML form in JSON format?

Answer

To post a complete HTML form we need to call “serialize” function as shown in the below code. “form1” is a HTML form. The data given by the function can then be passed to the “post” method of Jquery.”DisplayData” is a callback function to handle the output given by the server.

var Mydata = $("#form1").serialize();
$.post("/Customer/getCustomer", MyData, DisplayData);

 

All JSON Questions

Ask your interview questions on json

Write Your comment or Questions if you want the answers on json from json Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---