HTML
导入代码模板:
Serialize form elements for use in AJAX request
Sometimes you want to handle FORM
elements using AJAX
(Asyncron Javascript And Xml). jQuery has a method which will serialize elements – serialize()
– to querystring parameters,
which can then be sent to the server for processing. NB: Only valid elements are serialized.
Form
search
url
tel
number
range
date
month
week
time
datetime
datetime-local
color
Radio Button
Monkey
Lion
penguin
Checkbox
Football
Golf
Handball
Select
Pizza
Nudles
Hot dog
Select (multiple)
Pizza
Nudles
Hot dog
Textarea
Try altering the form elements