How to remove selection from a listbox in html by javascript and jQuery? -
after click item on listbox, i'll processing need remove selection @ first time can click same item again , fire event of selected index change.
set selectedindex property -1:
// plain js: document.getelementbyid("mylist").selectedindex = -1; // using jquery select element: $("#mylist")[0].selectedindex = -1; working demo: http://jsfiddle.net/n84aw/
Comments
Post a Comment