Skip to content

Commit d16d569

Browse files
Chealermgol
authored andcommitted
val: Mention radio buttons in addition to selects and checkboxes
Fixes jquery#981 Closes jquery#987
1 parent 36e1316 commit d16d569

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entries/val.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<longdesc>
1414
<p>The <code>.val()</code> method is primarily used to get the values of form elements such as <code>input</code>, <code>select</code> and <code>textarea</code>. When called on an empty collection, it returns <code>undefined</code>.</p>
1515
<p>When the first element in the collection is a <code>select-multiple</code> (i.e., a <code>select</code> element with the <code>multiple</code> attribute set), <code>.val()</code> returns an array containing the value of each selected option. <strong>As of jQuery 3.0</strong>, if no options are selected, it returns an empty array; <strong>prior to jQuery 3.0</strong>, it returns <code>null</code>.</p>
16-
<p>For selects and checkboxes, you can also use the <a href="/selected-selector/">:selected</a> and <a href="/checked-selector/">:checked</a> selectors to get at values. For example:</p>
16+
<p>For selects, checkboxes and radio buttons, you can also use the <a href="/selected-selector/">:selected</a> and <a href="/checked-selector/">:checked</a> selectors to get at values. For example:</p>
1717
<pre><code>
1818

1919
// Get the value from a dropdown select

0 commit comments

Comments
 (0)