$("#select_id").change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 
var checkText=$("#select_id").find("option:selected").text(); //获取Select选择的Text 
var checkValue=$("#select_id").val(); //获取Select选择的Value 
var checkIndex=$("#select_id ").get(0).selectedIndex; //获取Select选择的索引值 
var maxIndex=$("#select_id option:last").attr("index"); //获取Select最大的索引值 

相关文章:

  • 2021-09-09
  • 2022-01-08
猜你喜欢
  • 2021-07-24
  • 2022-12-23
  • 2021-12-10
  • 2021-11-17
  • 2021-11-21
  • 2021-11-21
  • 2021-12-22
相关资源
相似解决方案