how to prevent to change selectbox value if i say no to confirm

后端 未结 4 1499
野趣味
野趣味 2021-02-07 00:59

i m using a select box of country, when user select a country then add branch link appears and user add branches under that country, but when user want to change country then al

4条回答
  •  没有蜡笔的小新
    2021-02-07 01:33

    Below solution worked for me. First of all onfocus is called. This event keeps the current value in a attribute "PrvSelectedValue". Secondly onchange is called, we set the previous value if user cancel the confirmation popup.return false is used to prevent the postback in ASP.NET.

    
    

提交回复
热议问题