DropDown list selected index change event how to w

2019-08-04 04:49发布

How written the jquery

DropDown list selected index change event how to work jquery?

标签: c# jquery razor
2条回答
叛逆
2楼-- · 2019-08-04 05:45

You can use below code:

<select id="selDiv" name="selDiv">
       <option>111</option>
       <option>222</option>
       <option>333</option>
    </select>

    $('#selDiv').change(function(){
       /// you can write you code what you want to do...
    });
查看更多
够拽才男人
3楼-- · 2019-08-04 05:56
<select class="target">
    <option value="option1" selected="selected">Option 1</option>
    <option value="option2">Option 2</option>
  </select>

$(document).ready(function(){

$('.target').change(function() {
  alert('Dropdown Changed');
});

});

Further Reference

查看更多
登录 后发表回答