$('.city-area').on('change',function(){ //select切换事件
console.log($('#city option:selected').text());//获取选中的文本值
console.log($('#city option:selected').val());//获取选中的值,指value
});
$('.city-area').on('change',function(){ //select切换事件
console.log($('#city option:selected').text());//获取选中的文本值
console.log($('#city option:selected').val());//获取选中的值,指value
});
本文标题:select 获取选中的值
本文链接:https://www.haomeiwen.com/subject/crmswttx.html
网友评论