javascript
潘多拉猫
改bug就要不舍不放弃终究能够干掉bug.
展开
-
javascript函数 匿名函数 立即调用
1.函数的返回值:function add(a, b ) {return a + b;} 函数有返回值,当没有显示的定义函数的返回值时,默认返回undefined2.定义函数时你可以为函数指定的参数。当传递参数值时,如果忘记了给这个参数传递值,javascript会给参数自动赋值undefined。exp:function add(a, b) {return翻译 2013-09-30 21:20:10 · 1797 阅读 · 0 评论 -
无法找到此网页
里面有javascript引用的外部文件后打不开。原创 2013-08-27 15:43:59 · 687 阅读 · 0 评论 -
requestAnimate 绘制气泡
1.Boid 类作为Bubble 的父类 code:function getRandom (min, max ) { return Math.random() * (max- min) + min; //产生一个在min到max 之间的随机数}// the Boid class to be inherited by Bubble classfunction Boid (maxS原创 2013-08-27 07:22:43 · 2117 阅读 · 0 评论 -
jsDraw2d
jsDraw2d 是由jsFiction基于LGPL协议发布的一javascript2D绘图库。源代码及实例在挂官方网站中可见。 从这段代码中,我学到很多。原创 2013-08-24 23:15:24 · 1681 阅读 · 0 评论 -
html5 canvas 绘制贝塞尔曲线
html5 canvas 提供了绘制 贝塞尔曲线的两个方法,参见此处。转载 2013-08-23 22:14:42 · 1084 阅读 · 0 评论 -
疑问解决代码小记录
1.重新修改值: function Base( name, age ) { this.name = name; this.age = age; this.job = "soft";}function Sub(name, age ,job) { Base.call(this,name , age); //this.name =原创 2013-08-21 06:09:12 · 798 阅读 · 0 评论 -
数组上面犯的错误
array.push 之后,数组的长度增加,产生循环。原创 2013-08-22 20:29:31 · 784 阅读 · 0 评论 -
canvas 绘制阴影效果
link:http://www.linuxidc.com/Linux/2012-05/59898.htm转载 2013-08-22 14:44:51 · 1082 阅读 · 0 评论 -
原型式继承
var person = { name: "zhang", sex: "woman", sayName: function () { alert(name); }};function object(obj) { var F = {}; // 这里应该是函数 ,代码应该是这样 function F () {}原创 2013-08-22 16:44:47 · 779 阅读 · 0 评论 -
getBoundingClientRect() method
link:http://ejohn.org/blog/getboundingclientrect-is-awesome/#postcomment随后要翻译一下:可以有left,top .原创 2013-08-21 15:16:50 · 862 阅读 · 0 评论 -
javascript 构造函数
构造函数的例子: function Person(name, age,job) { this.name = name; this.age = age; this. job = job;}转载 2013-10-01 15:33:07 · 932 阅读 · 0 评论