摘要: 一 键盘事件 1)常用的三个 //1 onkeyup 按键弹起时触发 document.onkeyup = function () { console.log('弹起时才触发'); } //2 onkeydown 按键按下的时候触发 document.onkeydown = function () 阅读全文
posted @ 2021-02-25 19:18 棉花糖88 阅读(187) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv 阅读全文
posted @ 2021-02-25 15:49 棉花糖88 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 图片放大镜用的就是这个思路 <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, init 阅读全文
posted @ 2021-02-25 12:07 棉花糖88 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 1)禁止复制功能 //1 禁止鼠标选中文字 document.onselectstart = function (e) { e.preventDefault(); } //2 禁止鼠标右键菜单 document.oncontextmenu = function (e) { e.preventDefa 阅读全文
posted @ 2021-02-25 11:46 棉花糖88 阅读(80) 评论(0) 推荐(0) 编辑