判断是否存在子节点的实现代码
内容摘要
判断是否存在子节点的实现代码
Object.prototype.exist = function(){
if(typeof this !='undefined' && this.length>=1){
return true;
}
return false;
};
Object.prototype.exist = function(){
if(typeof this !='undefined' && this.length>=1){
return true;
}
return false;
};
文章正文
判断是否存在子节点的实现代码
Object.prototype.exist = function(){ if(typeof this !='undefined' && this.length>=1){ return true; } return false; };
不解释。
以上这篇判断是否存在子节点的实现代码就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持phpstudy。
代码注释