摘要: 英文和数字为一个字符,汉字为两个字符 在 Web 开发中,经常要对表单元素的输入进行限制,比如说不允许输入特殊字符,标点。通常我们会监听 input 事件: inputElement.addEventListener('input', function(event) { let regex = /[ 阅读全文
posted @ 2017-08-24 12:37 FEDeveloper 阅读(16387) 评论(0) 推荐(0) 编辑
摘要: 禁止复制方法:*{ -webkit-user-select: none;/*禁用手机浏览器的用户选择功能 */ -moz-user-select: none; -webkit-touch-callout: none; -ms-user-select:none; /*IE10*/ user-selec 阅读全文
posted @ 2017-08-24 09:59 FEDeveloper 阅读(764) 评论(0) 推荐(0) 编辑