Jquery always thought acquire select the option selected text value, it is written like this:
$("#s").text(); //获取所有option的文本值
In fact, it should be this:
$("#s option:selected").text(); //获取选中的option的文本值
Jquery always thought acquire select the option selected text value, it is written like this:
$("#s").text(); //获取所有option的文本值
In fact, it should be this:
$("#s option:selected").text(); //获取选中的option的文本值