javascript
xushaoxun
这个作者很懒,什么都没留下…
展开
-
javascript 变量与条件判断
//判断哪些东西被当作falsefunction fun(a){ if(!a) alert("not " + a) else alert(true)}fun(); //not undefinedfun(0); //not 0fun(""); //notfun(false); //not false...原创 2008-08-14 12:29:37 · 159 阅读 · 0 评论 -
关于undefined和null
不解的问题是: null 和 undefined 有何区别 function fun1(p1){ //在这个function中,p1已经存在 alert(p1==null); //如果fun1(), 这两个都会是true alert(p1==undefined); } //底下两句会抛出RefferenceErroraler...2008-09-25 10:04:21 · 144 阅读 · 0 评论 -
关于new和函数调用
function Point(x, y){ this.x = x this.y = y this.f = function(){}}var p1 = Point(1, 2) //undefined, 因为Point()无返回值var p2 = new Point(3, 4) //object, 拥有x, x, f属性 ///////////...2008-10-01 11:57:27 · 106 阅读 · 0 评论 -
dojo and ajax
XHRhas limitations. The big one is that url: is not cross-domain: you can't submit the requestoutside of the current host (eg: to url:"http://google.com"). It is a know...2008-05-14 23:14:39 · 106 阅读 · 0 评论