- 博客(2)
- 收藏
- 关注
原创 处理jquery点击事件不生效
有时候jquery ajax 动态生成了一段HTML代码 点击事件不生效的处理方法//获取不到这个id$('#id).click(function(){ console.log('点击事件‘)})这个时候要写成$(document).on(click,'要选择的元素',function(){ console.log('点击事件‘)})$(document).on是把事件委托到了document上$(’#idname’).on是把事件委托到了元素上面$(“className”).on
2020-07-09 10:31:58
1261
1
转载 整理2020前端vue面试题
整理前端vue面试题1.vue-router有两种传参方式(1)通过在router.js文件中配置path的地方动态传递参数 eg: path: ‘/detail/:id’ 然后在组件内通过this.$route.params.id即可获取(2).在router-link标签中传递参数<router-link :to={params: { x: 1 }} />也通过this.$route.params获取注意:这里通过router-link传递参数的方式是隐式传参2.
2020-05-22 17:43:59
304
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人