From 61ffc08636ed39b17d828e6406d63631c3f29ade Mon Sep 17 00:00:00 2001 From: Chealer Date: Sat, 1 Oct 2016 11:35:22 -0400 Subject: [PATCH] Address issue #981 Mention radio buttons in addition to selects and checkboxes --- entries/val.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entries/val.xml b/entries/val.xml index b2aa7613..e7a82550 100644 --- a/entries/val.xml +++ b/entries/val.xml @@ -13,7 +13,7 @@

The .val() method is primarily used to get the values of form elements such as input, select and textarea. When called on an empty collection, it returns undefined.

When the first element in the collection is a select-multiple (i.e., a select element with the multiple attribute set), .val() returns an array containing the value of each selected option. As of jQuery 3.0, if no options are selected, it returns an empty array; prior to jQuery 3.0, it returns null.

-

For selects and checkboxes, you can also use the :selected and :checked selectors to get at values. For example:

+

For selects, checkboxes and radio buttons, you can also use the :selected and :checked selectors to get at values. For example:


 
 // Get the value from a dropdown select