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>
Select an item in the created list by mouse click. Clicking the button removes the selection.
See also: