上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页
摘要: 现在不使用ZeroClipboard我们也能实现首先,我们保证页面结构不变,但不在引入ZeroClipboard插件:1 2 然后,我们使用document.execCommamd来对内容进行复制:(function(){ 2 var btn = document.getElementByI... 阅读全文
posted @ 2015-10-15 14:38 唸随爱 阅读(435) 评论(0) 推荐(0) 编辑
摘要: ¥('.access_digital .add','click',function(){ var icoimg_btn = $(this).parents(".wtxt").siblings(".icoimg"), wh = $(window).height(),//是文... 阅读全文
posted @ 2015-09-21 17:27 唸随爱 阅读(283) 评论(0) 推荐(0) 编辑
摘要: // var wh = $(window).height(),//是文档窗口高度// ot = $("#icoimg").offset().top,//是标签距离顶部高度// ds = $(document.documentElement).scrollTop();//是滚动条高度... 阅读全文
posted @ 2015-09-21 11:56 唸随爱 阅读(6059) 评论(0) 推荐(0) 编辑
摘要: 首先自然是检测浏览器是否支持本地存储。在HTML5中,本地存储是一个window的属性,包括localStorage和sessionStorage,从名字应该可以很清楚的辨认二者的区别,前者是一直存在本地的,后者只是伴随着session,窗口一旦关闭就没了。二者用法完全相同,这里以localStor... 阅读全文
posted @ 2015-09-14 10:35 唸随爱 阅读(206) 评论(0) 推荐(0) 编辑
摘要: var txt = "12312131283", str = txt.replace(/(12(.3))/g,"中文$2");//$1是针对前面的扑获组()的如果有两个()就有$1和$2;中文$2就是中文加个获取的捕获组(.3) console.log(str); 阅读全文
posted @ 2015-09-13 15:29 唸随爱 阅读(193) 评论(0) 推荐(0) 编辑
摘要: //如果列表中有存在给定的值就删除// function removeClass(ele,txt){ // var str = ele.className,// ary = str.split(/\s+/),// pos = -1,// i = ary.length-1;// ... 阅读全文
posted @ 2015-09-13 14:25 唸随爱 阅读(9305) 评论(0) 推荐(0) 编辑
摘要: 123var test = tests.firstChild.nodeValue; tests = tests.childNodes[0]; tests.insertData(0,789);//从前插入789var t2 = document.querySelector("#tests");//... 阅读全文
posted @ 2015-09-13 11:31 唸随爱 阅读(1889) 评论(0) 推荐(0) 编辑
摘要: 写页面事件的时候,有的时候需要用event.preventDefault取消原有的事件后进行重写,这个大家应该都知道。那么怎么在取消默认事件后再恢复呢。解绑我们自定义的事件就好了。以Jquery为例我们用$(“body”).bind(“touchmove”,function(event){e... 阅读全文
posted @ 2015-09-08 11:11 唸随爱 阅读(496) 评论(0) 推荐(0) 编辑
摘要: Options FollowSymLinksAllowOverride NoneOrder deny,allow Allow from all #以前是Deny from all## Possible values for the Options directive are "None", "A... 阅读全文
posted @ 2015-08-24 10:45 唸随爱 阅读(492) 评论(0) 推荐(0) 编辑
摘要: //跨浏览器兼容问题 Util = { //添加类名 add : function(ele,type,hand){ if(ele.addEventListener){ ele.addEventListener(type,hand,false); ... 阅读全文
posted @ 2015-08-24 10:08 唸随爱 阅读(387) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 23 下一页