First, I have a form that looks like this.
<HTML> <form> <! -- First group of data --> <Div class = 'recall'> <input type = "text" name = "ID"/> <input type = "text" name = "name "/> <input type = "text" name = "Age"/> <input type = "text" name = "sex"/> </div> <! -- The second group of data --> <Div class = 'recall'> <input type = "text" name = "ID"/> <input type = "text" name = "name "/> <input type = "text" name = "Age"/> <input type = "text" name = "sex"/> </div> <input type = "Submit" name = "Submit" value = "Submit"/> </form>
How to make the data submitted by the form become like this
[{"ID": 1, "name": "Zhang San", "Age": 18, "sex": 1 },{ "ID": 2, "name ": "Wang Li", "Age": 20, "sex": 2}]
The general idea is to use jquery. Unfortunately, jquery is not familiar with it. Who can help me?
Q: How do I submit form data by group?