1. 首页
  2. 服务器应用
  3. 虚拟化
  4. jQuery 对Select的操作备忘记录

jQuery 对Select的操作备忘记录

上传者: 2020-12-13 08:12:55上传 PDF文件 24.7KB 热度 12次
jQuery获取Select选择的Text和Value: 语法解释: 1. $(“#select_id”).change(function(){//code...}); //为Select添加事件,当选择其中一项时触发 2. var checkText=$(“#select_id”).find(“option:selected”).text(); //获取Select选择的Text 3. var checkValue=$(“#select_id”).val(); //获取Select选择的Value 4. var checkIndex=$(“#select_id “).get(0).selecte
下载地址
用户评论