当更改其中任何一个时,获取每个选择列表的选定值

时间:2015-06-22 08:07:57

标签: javascript jquery html

我有多个具有班级Stream stream = null; try { stream = new FileStream("file.txt", FileMode.OpenOrCreate); using (StreamWriter writer = new StreamWriter(stream)) { stream = null; // Use the writer object... } } finally { if(stream != null) stream.Dispose(); } 的选择列表。

option

我想要的是,每当有人改变时,我想迭代所有选择列表并获得他们选择的值。

<select class-'option'> ...  </select>

以上就是我到目前为止所尝试的,$('select.option').change(function () { $('select.option').each(function (e) { var newPriceValue = this.options[this.selectedIndex].value; }); }); 就像JS一样,

但我想知道一个Jquery解决方案

0 个答案:

没有答案