asp.net - jquery: select and unselect items of listbox -


I have 2 listboxes in the ASP.Net page (select in HTML) I want to know when one item of list 1 If selected, then the selected item in list 2 has not been deselected, and the Vice President

2 selections are exclusive to each other.

How can I do this?

  $ (function () {var list1 = $ ("# listbox1"); var List2 = $ ("# listbox2"); list1.change (function () {$ ("option", list2) .attr ('selected', false);}); list2.change (function () {$ (" Option ", list1) .attr ('selected', false);});});  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -