摘要: 字符串处理截取slice、substring、substr的异同 在项目开发过中,字符串是一种很特殊的东西,不可逃避地要经常对其处理,截取获得某几个字符是一种经常的事情。然而,在面试题中也经常出现对字符串处理的一些问题,尤其一些大公司,比如:慧*网,最近看其面试题中就有一道:说一下falsh编程中s 阅读全文
posted @ 2016-07-12 16:59 小小公举 阅读(221) 评论(0) 推荐(0) 编辑
摘要: location.protocol="http:"//即,协议location.hostname="zhidao.baidu.com"//即,主机域名 阅读全文
posted @ 2016-07-10 13:55 小小公举 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Js apply方法详解 我在一开始看到javascript的函数apply和call时,非常的模糊,看也看不懂,最近在网上看到一些文章对apply方法和call的一些示例,总算是看的有点眉目了,在这里我做如下笔记,希望和大家分享.. 如有什么不对的或者说法不明确的地方希望读者多多提一些意见,以便共 阅读全文
posted @ 2016-07-10 12:57 小小公举 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 'mousedown touchstart', 'mousemove touchmove', 'mouseup mouseleave touchend touchleave touchcancel', 'wheel mousewheel DOMMouseScroll', ondragstart 事件 阅读全文
posted @ 2016-07-09 22:57 小小公举 阅读(424) 评论(0) 推荐(0) 编辑
摘要: autofocus 让元素在dom载入后获得焦点 <!-- These all work! --> <input autofocus="autofocus" /> <button autofocus="autofocus">Hi!</button> <textarea autofocus="auto 阅读全文
posted @ 2016-07-06 10:35 小小公举 阅读(597) 评论(0) 推荐(0) 编辑
摘要: 原生js操作dom元素 var link = document.createElement( "link" );link.type = "image/x-icon";link.rel = "icon";link.href = "https://i.alipayobjects.com/common/f 阅读全文
posted @ 2016-06-24 19:22 小小公举 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 控制线显示0.5px .line:after{ content:""; display:block; position:absolute; width:200%; left:0; right:0; top:0; z-index:99; border-bottom:1px solid #eee; -w 阅读全文
posted @ 2016-06-21 11:32 小小公举 阅读(562) 评论(0) 推荐(0) 编辑
摘要: 1,reload 方法,该方法强迫浏览器刷新当前页面。语法:location.reload([bForceGet]) 参数: bForceGet, 可选参数, 默认为 false,从客户端缓存里取当前页。true, 则以 GET 方式,从服务端取最新的页面, 相当于客户端点击 F5("刷新") 这样 阅读全文
posted @ 2016-06-17 15:29 小小公举 阅读(931) 评论(0) 推荐(0) 编辑
摘要: 6种炫酷的CSS3按钮边框动画特效Button border animate 用鼠标滑过下面的按钮看看效果! Draw Draw Meet Center Spin Spin Circle Spin Thick 用鼠标滑过下面的按钮看看效果! http://www.w2bc.com/demo/2015 阅读全文
posted @ 2016-06-17 14:44 小小公举 阅读(2033) 评论(0) 推荐(0) 编辑
摘要: eval( [1,2,3,4].join("+"));因为eval可以把字符串当成表达式去 执行 阅读全文
posted @ 2016-06-16 17:33 小小公举 阅读(359) 评论(0) 推荐(0) 编辑