Hot to get all form elements values using jQuery?

后端 未结 9 1712
谎友^
谎友^ 2020-12-22 23:45

Here is the HTML code:



    HTML Form Builder         


        
9条回答
  •  轮回少年
    2020-12-23 00:28

    jQuery has very helpful function called serialize.

    Demo: http://jsfiddle.net/55xnJ/2/

    //Just type:
    $("#preview_form").serialize();
    
    //to get result:
    single=Single&multiple=Multiple&multiple=Multiple3&check=check2&radio=radio1
    

提交回复
热议问题