Select下拉框选中事件,option选中事件

select下拉框选中触发事件

<select id="comSelect" name="deptCode" class="w138" > 
							
</select>
<script>
$(document).ready(function(){//文档加载时就加载这个方法
    $("#comSelect").change(function(){//这个方法中写入下拉框选中后你要触发的事件,可以是css也可以是其它
    var deptCode = $("#comSelect").val();
	console.log("机构代码:" + deptCode);
	modelNameAndCode("#browlist");
    });
});
</script>

猜你喜欢

转载自blog.csdn.net/uziuzi669/article/details/107558340
今日推荐