上一页 1 ··· 4 5 6 7 8
摘要: 禁止复制:oncopy=”return false” 禁止粘贴:onpaste=”return false” 禁止剪切:oncut=”return false” 禁止右键弹出:oncontextmenu=”return false” 关闭自动完成功能(缓存):autocomplete=”off” 自 阅读全文
posted @ 2017-08-29 11:58 猫老板的豆 阅读(2388) 评论(0) 推荐(0) 编辑
摘要: *{ -webkit-user-select:none; -moz-user-select: none; -ms-user-select: none; user-select:none;/*禁用页面内容选中和复制操作*/ -webkit-touch-callout:none;/*禁用长按页面时的弹出 阅读全文
posted @ 2017-08-29 11:56 猫老板的豆 阅读(989) 评论(0) 推荐(0) 编辑
摘要: 前言 JavaScript中有三个可以对字符串编码的函数,分别是:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 。 escape()和它们不是同一类 简单来说,escape()是对 阅读全文
posted @ 2017-08-29 11:48 猫老板的豆 阅读(270) 评论(0) 推荐(0) 编辑
摘要: 数组去重 方法一:利用 es6 filter var arr = [1,4,2,5,6,4,2,7] var arr1 = arr.filter(function(element, index, self){ return self.indexOf(element) == index }); arr 阅读全文
posted @ 2017-08-29 11:40 猫老板的豆 阅读(351) 评论(1) 推荐(0) 编辑
摘要: 微信js-sdk分享详解及demo实例 阅读全文
posted @ 2017-08-29 11:35 猫老板的豆 阅读(2420) 评论(0) 推荐(0) 编辑
摘要: 一、对象是数组: var arr = [9, 8, 7, 6, 5, 4, 3, 2, 1]; //each遍历: $.each(arr,function (index,value) { alert(index) }) //0 1 2 3 4 5 6 7 8 $.each(arr,function 阅读全文
posted @ 2015-11-27 11:45 猫老板的豆 阅读(197) 评论(0) 推荐(0) 编辑
摘要: /*字符串处理*/ var a="Hello world!" console.log(a.indexOf("e")) //1 l的index 不存在-1 lastIndexOf() console.log(a.search("w")) //6 l的index 不存在-1 查找 console.log 阅读全文
posted @ 2015-11-23 18:04 猫老板的豆 阅读(436) 评论(0) 推荐(0) 编辑
摘要: javaScript系列:js中获取时间new Date()详细介绍 阅读全文
posted @ 2015-11-20 11:54 猫老板的豆 阅读(16025) 评论(0) 推荐(0) 编辑
摘要: JSON和JSONP JSON(JavaScript Object Notation)和JSONP(JSON withPadding)虽然只有一个字母的差别,但其实他们根本不是一回事: JSON是一种数据交换格式,而JSONP是一种非官方跨域数据交互协议。 我们拿谍战片来打个比方,JSON是地下党们 阅读全文
posted @ 2015-11-19 14:02 猫老板的豆 阅读(694) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8