clearSelection();
The clearSelection method is used to cancel the selection.
To execute the example, create the ListBox component (see Example of Creating the ListBox Component) named listbox. Create the HTML button with the Cancel selection text on pressing it the clearSelection method is invoked:
<button onclick="listbox.clearSelection();">Clear selection</button>
Click to select an element in the created list. Clicking the button removes the selection.
See also: