Consider a simple function that adds the first
N integers. (e.g.sum(5) = 1 + 2 + 3 + 4 + 5 = 15).Here is a simple Python
implementation that uses recu...
分类:
其他好文 时间:
2014-05-08 17:35:09
阅读次数:
286
window.onload=function() {
var img=document.getElementById("img").children;
var lis=document.getElementById('ul').getElementsByTagName("li"); //这里是获取需要执行动态效果的demo
...
分类:
编程语言 时间:
2014-05-08 16:06:15
阅读次数:
386
在lua中创建一个Actor对象function Actor.new() local temp
= {} setmetatable(temp, Actor) temp.x = 10 temp.y = 20 return tempendobj =
Actor.new()那么obj.x = 1...
分类:
其他好文 时间:
2014-05-08 15:04:41
阅读次数:
348
写在选择器源码分析之前这里指对1.7.2版本的源码分析,更高版本添加了更多代码。整个jQuery的代码是写在一个(function(window,undefined){})(window);这样一个闭包里。请思考,为什么要这样做?将其写在一个闭包函数里,并传入window直接运行的好处有三:
1,统...
分类:
Web程序 时间:
2014-05-08 09:38:16
阅读次数:
453
转自:http://blog.csdn.net/longyangyangyang/article/details/6128141html代码: 0 1 2 3
4 5 6 7 js代码//通过javascrip方法获取值function chk(){ var o...
分类:
Web程序 时间:
2014-05-08 08:34:37
阅读次数:
304
//初始化对象并发出XMLHttpRequest请求var xmlHttp;function
getXmlHttp(){ if(window.ActiveXObject){ xmlHttp = new
ActiveXObject("MICROSOFT.XMLHTTP"); ...
分类:
其他好文 时间:
2014-05-08 07:19:46
阅读次数:
378
Given an array of integers, find two numbers
such that they add up to a specific target number.The function twoSum should
return indices of the two nu...
分类:
其他好文 时间:
2014-05-08 06:33:29
阅读次数:
339
每次操作select都要查资料,干脆总结一下。为select设置placeholder为Select添加事件,当选择其中一项时触发$("#select_id").change(function(){
//code...});jQuery获取Select选择的Text和Value:var che...
分类:
Web程序 时间:
2014-05-08 05:48:25
阅读次数:
509
Polyfill Function.prototype.bind的四个阶段
分类:
其他好文 时间:
2014-05-08 05:40:18
阅读次数:
342
昨晚自己倒腾的。估计这种代码只有自己看得懂了。第一篇博文,纪念一下。代码插入这个还是比较方便的~~varkeyHandler=function(event){
vare=event||window.event||arguments.callee.caller.arguments[0];
varhoverCSS={
color:‘#FFF‘,
‘background-color‘:‘#6E9DE4‘
};
varbac..
分类:
Web程序 时间:
2014-05-08 03:12:31
阅读次数:
541