为你而来

2012年5月30日

javascript杂记1

摘要: 1 var n=1;2 3 var f=new Function("return n;");4 5 new Function("x,y","return x+y;");//用new Function定义的函数为顶级函数,能够获取顶级的变量,如n1 ( function(a,b)2 {3 alert(typeof a+"\n"+typeof b);4 }5 )('a',1);1 func=new Function("this.a='struts';");2 3 fu 阅读全文

posted @ 2012-05-30 21:52 为你而来 阅读(211) 评论(0) 推荐(0) 编辑

导航