2 回答
用于所选选项$("#element").val()
的值或$("#element option:selected").text()
用于获取所选选项的名称/文本。
Since (on your page, given that specific html) you can only identify the select by its Name
(without having to traverse the DOM), the quickest solution is:
var selectedvalue = $('select[name="priority"]').val();
I would suggest adding an ID to the dropdownlist, it will be a more efficient search. But hardly noticeable unless your page is huge, so it's more a ""good practice principle".
Please note: I used ' for the jQuery selector string, and " for the name value within the selector. You could use them the other way around, but they will have to be different.