01 2016 档案
摘要:1 db.collection.find({2 time:{3 "$gte": new Date('2014-01-24'),4 "$lte":new Date('2014-01-25')5 }6 })
阅读全文
摘要:http://blog.jobbole.com/30592/
阅读全文
摘要:封装的localstorge的插件,store.jshttps://github.com/marcuswestin/store.js/
阅读全文
摘要:jquery.cookie用法详细解析需要注意存入cookie前,对数据进行序列化,得到后在反序列化;熟练运用;JSON.stringify();和JSON.parse();通常分为如下几个步骤;1、将对象键值队序列化,通过JSON.stringify();2、将序列化的值存入cookie3、得到c...
阅读全文
摘要:连接地址为;http://4.suancai.sinaapp.com/localstorg/a.html原理是,a页面设置了sessionstorge,b页面可以访问到;并且已关闭浏览器,sestionstorge存储的数据就会清零;而localstorg不会;会继续存在手机的浏览器的内存中;而原先...
阅读全文
摘要:1 window.ontouchstart = function(e) { e.preventDefault(); };2 document.addEventListener("touchmove", function(e){ e.preventDefault(); }, false)...
阅读全文
摘要:1 2 3 4 5 6 Document 7 24 25 26 27 28 List item 1 DELETE29 List item 2 DELETE30 31 32 33 34 50 51 阻止长按复制的事件发生主要由两部分构成;...
阅读全文
摘要:1 2 3 4 5 6 Document 7 16 17 18 19 20 21 22 23 24 25 45 54 55
阅读全文
摘要:HTML5本地存储是一种让网页可以把键值对存储在用户浏览器客户端的方法。像Cookie一样,这些数据不会因为你打开新网站,刷新页面,乃至关闭你的浏览器而消失。 而与Cookie不同的时,这些数据不会每次随着HTTP请求被发送到服务器端(当然如果你需要这么做,你可以自己编程实现 ). 因为这是HTML...
阅读全文
摘要:$(".swiper-slide").click(function(){ var index = imgarr[$(this).index()]; var content = ""; $(".mengceng").sh...
阅读全文
摘要:1 2 3 4 5 Document 6 11 12 13 14 15 16 17 存储成功18 存储成功19 49 50
阅读全文
摘要:1 var json = { 2 userid: userid, 3 cid: cid, 4 openid: openid, 5 type: 1 6 }; 7 // 原生ajax...
阅读全文
摘要:随着express升级,bodyParser从express中被分离了出来,因此,在使用express新版本的时候,需要npm install body-parser 来安装bodyParser。在app.js中要引入bodyParser。var bodyParser = require('body...
阅读全文
摘要:1 {% block content2 %}2 {% include "footer.html" %}3 {% endblock %}include语句必须放到 block模块中,不然不起作用,还有一种情况,在layout.html中不用放入block模块中,也能起作用,
阅读全文
摘要:1 {{o.content|raw}}|raw 相当于一个函数,转义函数,最终输出结果为html代码;
阅读全文
摘要:1 // demo-json.js 2 var obj = { 3 "name": "LiLi", 4 "age": 22, 5 "sex": "F" 6 }; 7 8 var str = JSON.stringify(obj); 9 console.log(str...
阅读全文
摘要:1 $(function(){2 if (!navigator.userAgent.match(/mobile/i)) {3 //PC端4 }else{5 //移动端6 }7 })
阅读全文
摘要:移动端浏览网页元素时,自动给input和textarea添加了内部阴影的效果,只需加入样式即可去除1 input,textarea{-webkit-appearance: none;}1 input[type=button]{2 -webkit-appearance:none;3 o...
阅读全文
摘要:1 /* jshint -W079 */ 2 /* jshint -W020 */ 3 4 "use strict"; 5 var _ = require("lodash"); 6 7 module.exports = function(utils, db) { 8 9 // Model...
阅读全文
摘要:获取ticket是需要拼接url,url中需要获得的tocken1、先判断有无tocken;若有则拼接url;2、请求url;a、处理回调数据,注意时间戳和签名处理方式,此两项并未存到ticket中,b、存储回调数据,存储时将时间戳和签名存到ticket中;注意此两项并未存到数据库,而是在存储时动态...
阅读全文
摘要:获取token,本着两个原则,1、先查询是否有token,有的话判断其时间是否与上一次请求时间差是否超过7100;a、不超过,直接用得到;b、超过,再获取刷新;2、没有token获取刷新token;a、拼接地址,request.get请求token;将请求来的token保存到数据库更新,此处有技巧,...
阅读全文
摘要:1 /* jshint -W079 */ 2 /* jshint -W020 */ 3 4 "use strict"; 5 var _ = require("lodash"); 6 var sha1 = require('sha1'); 7 var urlencode = requ...
阅读全文
摘要:1 a{ -webkit-tap-highlight-color:transparent;}
阅读全文
摘要:unbind([type],[data]) 是 bind()的反向操作,从每一个匹配的元素中删除绑定的事件。如果没有参数,则删除所有绑定的事件。你可以将你用bind()注册的自定义事件取消绑定。如果提供了事件类型作为参数,则只删除该类型的绑定事件。如果把在绑定时传递的处理函数作为第二个参数,则只有这...
阅读全文