js 的下拉列表的取值使用方法。
举个栗子:
html
如果想在选中2 的时候做一些操作,需要用到的是select 的change 事件。
$(".FirsSlec").change(function(){
console.log($(".FirsSlec").find("option:selected").attr("value"));
})
举个栗子:
html
如果想在选中2 的时候做一些操作,需要用到的是select 的change 事件。
$(".FirsSlec").change(function(){
console.log($(".FirsSlec").find("option:selected").attr("value"));
})