diff --git a/entries/val.xml b/entries/val.xml index 3d1b96bf..9285a546 100644 --- a/entries/val.xml +++ b/entries/val.xml @@ -11,7 +11,7 @@ Get the current value of the first element in the set of matched elements. -

The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of <select multiple="multiple"> elements, the .val() method returns an array containing each selected option; if no option is selected, it returns null.

+

The .val() method is primarily used to get the values of form elements such as input, select and textarea. In the case of select elements, it returns null when no option is selected and an array containing the value of each selected option when there is at least one and it is possible to select more because the multiple attribute is present.

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


 // Get the value from a dropdown select