Skip to content

Commit 79a5c0c

Browse files
jugglinmikekswedberg
authored andcommitted
serializeArray: Document Behavior for Value-less Input Elements
Close jquerygh-1018
1 parent ab9fcb0 commit 79a5c0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/serializeArray.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929
</form>
3030
</code></pre>
31-
<p>The <code>.serializeArray()</code> method uses the standard W3C rules for <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2">successful controls</a> to determine which elements it should include; in particular the element cannot be disabled and must contain a <code>name</code> attribute. No submit button value is serialized since the form was not submitted using a button. Data from file select elements is not serialized.</p>
31+
<p>The <code>.serializeArray()</code> method uses the standard W3C rules for <a href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2">successful controls</a> to determine which elements it should include; in particular the element cannot be disabled and must contain a <code>name</code> attribute. No submit button value is serialized since the form was not submitted using a button. Data from file select elements is not serialized. Elements that do not contain a <code>value</code> attribute are represented with the empty string value.</p>
3232
<p>This method can act on a jQuery object that has selected individual form controls, such as <code>&lt;input&gt;</code>, <code>&lt;textarea&gt;</code>, and <code>&lt;select&gt;</code>. However, it is typically easier to select the <code>&lt;form&gt;</code> element itself for serialization:</p>
3333
<pre><code>
3434
$( "form" ).submit(function( event ) {

0 commit comments

Comments
 (0)