name = $in_name; $this->age = $in_age;
$this->owner = $in_owner; } function getage() { return ($this->age * 365);
} f...
分类:
其他好文 时间:
2014-05-08 12:36:51
阅读次数:
336
1 duration = $duration;10 $this->costtype =
$costtype;11 }12 13 function cost(){14 switch ($this->costtype){15 ...
分类:
其他好文 时间:
2014-05-08 12:02:21
阅读次数:
190
如果要获取一张图片原本的高度和宽度,我们一般这样获取var url =
"../images/1.jpg";var img = new Image();img.src = url;img.onload = function(){
//do something.....}当图片从服务器传到本来(也即....
分类:
其他好文 时间:
2014-05-08 11:23:03
阅读次数:
358
写在选择器源码分析之前这里指对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