在线
客服

发布
需求

在线
聊天

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

在vue.js不能使用e.preventDefault()

window.top.addEventListener('popstate',function (event) {  event.preventDefault()  // history.go(1)  console.log('close the window')  // WeixinJSBridge.call('closeWindow')},false)我想在项目中设置点击返回按钮时失效,但是我引入了preventDefault没有阻止默认返回事件,为什么呢?

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册