HTML代码如下:
<div class="col-sm-9 col-xs-12"> <select id="groupid" class="form-control" style="float: left" name="groupid"> <option value="0">请选择</option> <option value="2">2</option> <option value="4">4</option> <option value="6">6</option> <option value="8">8</option> </select> <div class="help-block"></div> </div>
Jquery代码如下:
<script type="text/javascript"> $(function() { $("#groupid").change(function(){ alert($(this).val()); }); }); </script>
时间: 2024-10-21 10:33:25