A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/form/api/combo/combo_getvalue_method/ below:

Website Navigation


JavaScript Form - getValue Combo Box Method

getValue()

returns IDs of options which are currently selected in the Combo control

getValue(): string | number | (string | number)[];

Returns:

A string/number or an array with the ID(s) of the options from data collection that are currently selected in the control.

Example​

When the multiselection property of Combo control isn't specified or is set to false, the method returns a string/number value with the ID of the currently selected option:

const value = form.getItem("combo").getValue();
// -> "id_2"

If multiselection is enabled, the method returns an array of string/number values with the IDs of the currently selected options:

const value = form.getItem("combo").getValue();
// -> ['id_1', 'id_2']

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4