第一种方法:
if (typeof beforeReject != 'undefined' && beforeReject instanceof Function) {
beforeReject(nextStep);
}
第二种方法:
if (对象名.方法名)
{
//方法存在
对象名.方法名();
}
第三种方法:
if(typeof(nl.onBlue)=="function")
{
//存在
}
else
{
//不存在
}
第一种方法:
if (typeof beforeReject != 'undefined' && beforeReject instanceof Function) {
beforeReject(nextStep);
}
第二种方法:
if (对象名.方法名)
{
//方法存在
对象名.方法名();
}
第三种方法:
if(typeof(nl.onBlue)=="function")
{
//存在
}
else
{
//不存在
}