JavaScript禁止在网页中右键和选取功能
document.oncontextmenu = new Function('event.returnValue=false;') document.onselectstart = new Function('event.returnValue=false;')
Vue 中禁止当前页面使用右键
<div id="fei" @contextmenu.prevent="event => (event.returnValue = false)">这个是Vue最外层</div>
标签:false,JavaScript,右键,returnValue,网页,event From: https://www.cnblogs.com/dafei4/p/16814019.html