How to check whether a select box is empty using JQuery/Javascript

前端 未结 3 1586
感动是毒
感动是毒 2020-12-24 11:59

I have a select box that is being populated dynamically from a database. As of right now the population of this check box is working flawlessly.

I have added functio

3条回答
  •  Happy的楠姐
    2020-12-24 12:07

    Another correct way to get selected value would be using this selector:

    $("option[value="0"]:selected")
    

    Best for you!

提交回复
热议问题