[英]Discrepancies in select value(disabled option) in jQuery old and newer version
我已經在項目中將jquery版本從1.7.2更新到2.1.1,並使用了jquery migration作為后備。
我在jQuery 2.1.1和1.7.2中發現了與select值有關的問題。
1.7.2->“”(空白)
2.1.1->空
console.log("Version>>> 1.7.2 >>>> " + $jq("select").val());
console.log("Version>>> 2.1.1 >>> " + $("select").val());
有沒有人遇到類似的問題及其解決方法?
PS:我暫時使用Native JS使其正常工作。
使用:selected
jquery選擇器,您將得到什么?
$("select option:selected")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.