jQuery AJAX serializeArray() Method

프로그램&DB/AJAX 2011. 8. 23. 14:19 Posted by Josep.H.S

jQuery AJAX serializeArray() Method

jQuery AJAX Methods jQuery AJAX Methods

Example

Output the result of form values serialized as arrays:

$("button").click(function(){
  x=$("form").serializeArray();
  $.each(x, function(i, field){
    $("#results").append(field.name + ":" + field.value + " ");
  });
});

Try it yourself »

Definition and Usage

The serializeArray() method creates an array of objects (name and value) by serializing form values.

You can select one or more form elements (like input and/or text area), or the form element itself.

Syntax

$(selector).serializeArray()



[출처] http://www.w3schools.com

'프로그램&DB > AJAX' 카테고리의 다른 글

jQuery AJAX serialize() Method  (0) 2011.08.23
jQuery AJAX $.post() Method  (0) 2011.08.23
jQuery AJAX $.param() Method  (0) 2011.08.23
jQuery AJAX load() Method  (0) 2011.08.23
jQuery AJAX $.getScript() Method  (0) 2011.08.23