上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页
摘要: // Zepto.js// (c) 2010-2013 Thomas Fuchs// Zepto.js may be freely distributed under the MIT license.;(function($){ // Create a collection of callbacks to be fired in a sequence, with configurable behaviour // Option flags: // - once: Callbacks fired at most one time. // - memory:... 阅读全文
posted @ 2013-12-23 15:01 sexy_girl 阅读(301) 评论(0) 推荐(0) 编辑
摘要: function checkPassword(username,password,callback){ var pwdHash; var queryStr = 'select * from user where username = ?'; db.query(queryStr,username,queryCallback); function queryCallback(err,result){ if(err) throw err; pwdHash = result['passw... 阅读全文
posted @ 2013-12-23 11:26 sexy_girl 阅读(187) 评论(0) 推荐(0) 编辑
摘要: 1. 如果没有firebug , 可以用firebug-lite.js 内嵌的调试方式。2. console.log 不是所有浏览器都支持console.log 在IE或者没有调试窗口的浏览器中,console.log会undefinedvar db = {switch:true}db.log = function(){ if(!this.switch) return ; if( typeof console == 'undefined' ) return ; var slice = Array.prototype.slice; var args = slice.cal... 阅读全文
posted @ 2013-12-21 21:00 sexy_girl 阅读(356) 评论(0) 推荐(0) 编辑
摘要: Blockedtime includes any pre-processing time (such as cache lookup) and the time spent waiting for a network connection to become available. Internet Explorer will only create a maximum of two concurrent network connections per host name (i.e. www.microsoft.com) and will queue up requests until a ne 阅读全文
posted @ 2013-12-20 17:51 sexy_girl 阅读(316) 评论(0) 推荐(0) 编辑
摘要: $request = $.getJSON('test.php'); $request.done(process1); $request.done(process2); $request.always(process3); function process1() { console.log('process1:'); } function process2() { console.log('process2'); } function process3() { console.log('process3')... 阅读全文
posted @ 2013-12-20 11:25 sexy_girl 阅读(268) 评论(0) 推荐(0) 编辑
摘要: //已经把最外面的$ 保存到了内部。var _$ = window.$, _jQuery = window.jQuery,...noConflict: function( deep ) { window.$ = _$; //把最外面的$重新赋值 if ( deep ) { window.jQuery = _jQuery; } return jQuery; },window.jQuery = window.$ = jQuery; 阅读全文
posted @ 2013-12-18 21:11 sexy_girl 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Binding 阅读全文
posted @ 2013-12-18 15:20 sexy_girl 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 一、前言什么是模板引擎,说的简单点,就是一个字符串中有几个变量待定。比如:var tpl ='Hei, my name is , and I\'m years old.';通过模板引擎函数把数据塞进去,var data ={ "name":"Barret Lee", "age":"20"};var result = tplEngine(tpl, data);//Hei, my name is Barret Lee, and I'm 20 years old.那这玩意儿有什么作用呢?其 阅读全文
posted @ 2013-12-18 11:19 sexy_girl 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 1 username: 2 password: 3 4 define("uid", "user-A");define("pwd", "user-A-pwd");if(time() - $_POST['tid'] > 60*2 || $_POST['uid'] !== uid || decrypt(pwd . $_POST['tid']) !== $_POST['pwd']){ die("error");}时间超过2分钟uid不 阅读全文
posted @ 2013-12-18 11:13 sexy_girl 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-12-18 11:09 sexy_girl 阅读(513) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 15 下一页