这里写自定义目录标题
移动端禁止长按事件触发的复制粘贴
页面中全部文字内容禁止长按复制的方法 CSS 写法
*{
-webkit-touch-callout:none; /系统默认菜单被禁用/
-webkit-user-select:none; /webkit浏览器/
-khtml-user-select:none; /早期浏览器/
-moz-user-select:none; /火狐/
-ms-user-select:none; /IE10/
user-select:none;
}
缺点:会导致input框不能用
解决方法:
input{
-webkit-user-select: auto;
}
**
移动端禁止手机键盘弹出的方法
**
1.readonly
给input标签设置 readonly 属性
缺点:在iOS的Safari中无效
2.blur()方法
document.activeElement.blur()
当你的input获取焦点时 onfocus监听获取焦点事件时 调用document.activeElement.blur()方法
html :
<input type="text" @focus="Focus" />
js:
methods:{
Focus(){
document.activeElement.blur()
}
}
来源:CSDN
作者:你所见即我
链接:https://blog.csdn.net/weixin_44476689/article/details/89357364