最高半折刷qq各种业务和钻(家里人自己开的,尽管放心,大家多捧捧场)

sking7

导航

2012年1月6日 #

JavaScript和instanceof

摘要: 这里有张讲解prototype的图:http://www.mollypages.org/misc/js.mpMSN中关于new是这么描述的https://developer.mozilla.org/en/JavaScript/Reference/Operators/newSyntaxnew constructor[([arguments])]Parametersconstructor A function that specifies the type of the object instance.arguments A list of values that the constr... 阅读全文

posted @ 2012-01-06 10:12 G.N&K 阅读(284) 评论(0) 推荐(0) 编辑

关于eval

摘要: 关于eval说几句eval函数接收一个参数s,如果s不是字符串,则直接返回s。否则执行s语句。如果s语句执行结果是一个值,则返回此值,否则返回undefined。对于声明语句,eval并不能达到预想的结果例如var fun=eval('function (){alert(1);}');这里返回undefined上面的可以写成eval('(function (){alert(1);})();');但是可以eval('function test (){alert(1);}');然后调用函数testeval的高级用法function loadCode( 阅读全文

posted @ 2012-01-06 00:20 G.N&K 阅读(249) 评论(0) 推荐(0) 编辑