function如何作为另一个function的缺省参数 function如何作为另一个function的缺省参数 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 function hello(text,fn){ alert(text); if(fn){ //if(arguments.length==2) fn(); } } hello("word");这样?? function(text,fn){ alert(text); fn && Object.prototype.toString.apply(fn)==='[object Function]' && fn();}hello('world'); function hello(text,fn){ alert(text); fn && Object.prototype.toString.apply(fn)==='[object Function]' && fn();}hello('world'); Mootools1.41的API翻译工作已经启动了,SVN已经搭建ok,感兴趣的欢迎加入 如何动态选中单选按钮 各位CSDN的兄弟们,有时间看一下这个贴子。谢谢 百分求解window.open的奇怪问题 赠分20!! js 中怎么样得到 当前网页的URL,包括 查询的字符串??? 关于showModelessDialog问题 很弱的问题,谢谢! 请教高手一个简单问题 表单的提交 一个JS效果的实现 jquery取指定form中的指定input
alert(text);
if(fn){ //if(arguments.length==2)
fn();
}
}
hello("word");
这样??
function(text,fn){
alert(text);
fn && Object.prototype.toString.apply(fn)==='[object Function]' && fn();
}hello('world');
function hello(text,fn){
alert(text);
fn && Object.prototype.toString.apply(fn)==='[object Function]' && fn();
}
hello('world');