09 2017 档案

摘要:方式1、splice 1 2 3 var ary = [1,2,3,4]; ary.splice(0,ary.length); console.log(ary); // 输出 [],空数组,即被清空了 详细说明:http://www.w3school.com.cn/jsref/jsref_splic 阅读全文
posted @ 2017-09-26 10:21 front-gl 阅读(237) 评论(0) 推荐(0) 编辑
摘要:本文来自:http://2806814127.iteye.com/blog/2314656 本地存储是一个window的属性,包括localStorage和sessionStorage,从名字应该可以很清楚的辨认二者的区别,前者是一直存在本地的,除非清空本地的数据,后者只是伴随着session,窗口 阅读全文
posted @ 2017-09-26 09:24 front-gl 阅读(333) 评论(0) 推荐(0) 编辑
摘要:new Data(‘毫秒数’)是标准时间, new Data().getTime()是把标准时间转换成毫秒数 阅读全文
posted @ 2017-09-25 11:30 front-gl 阅读(13297) 评论(0) 推荐(0) 编辑
摘要:原因1:document.onselectstart= function(){return false;}; 原因2:父层设置了user-select:none 导致 子层设置了 contenteditable 会出现异常,但是在ie和chrome并没有体现出来 如果把编辑框换成input标签不会由 阅读全文
posted @ 2017-09-19 19:32 front-gl 阅读(2093) 评论(0) 推荐(0) 编辑
摘要:js: 阅读全文
posted @ 2017-09-19 19:26 front-gl 阅读(1646) 评论(0) 推荐(0) 编辑
摘要:原文链接:http://caibaojian.com/js-splice-element.html 删除数组指定的某个元素 首先可以给js的数组对象定义一个函数,用于查找指定的元素在数组中的位置,即索引,代码为: 然后使用通过得到这个元素的索引,使用js数组自己固有的函数去删除这个元素: 代码为: 阅读全文
posted @ 2017-09-19 15:03 front-gl 阅读(39386) 评论(0) 推荐(0) 编辑
摘要:由于经常会些写错,为了以后节约时间,记录下: 阅读全文
posted @ 2017-09-18 19:06 front-gl 阅读(373) 评论(0) 推荐(0) 编辑
摘要:.editor{ overflow:hidden; height:640px; padding:0 45px; border: 0 none; outline: none; } .editor::-webkit-scrollbar{ //设置整个滚动条宽高 width:6px; height:100%; } .editor::-webkit-scrol... 阅读全文
posted @ 2017-09-14 17:12 front-gl 阅读(6201) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示