<script>
$(function(){
$(document).on('click', '.add' ,function(){
window.location.href="{:url('index/index/info')}";
});
$(document).on('click', '.daohang', function () {
alert('导航' + $(this).attr('data-id'));
});
});
</script>
通过绑定document,在on事件参数填写需要绑定的元素
本文介绍了一种使用jQuery绑定元素事件的方法,通过在document上绑定事件处理器,并指定需要监听的元素选择器,实现特定元素点击时触发相应动作。
934

被折叠的 条评论
为什么被折叠?



