AngularJS angular.isElement
示例
在angular.isElement返回true,如果传递给它的参数是一个DOM元素或一个jQuery包裹元素。
angular.isElement(elem)
此函数对于在处理传递的参数之前进行类型检查是否有用是有用的。
例子:
angular.isElement(document.querySelector("body"))
//真正
angular.isElement(document.querySelector("#some_id"))
//假 if "some_id" is not using as an id inside the selected DOM
angular.isElement("<div></div>")
//假
热门推荐
10 祝女儿简短祝福语大全
11 大学新年祝福语简短创意
12 元旦适合的祝福语简短
13 朋友出远门祝福语简短
14 初六简短的祝福语
15 祝男孩生日祝福语简短
16 同事调离的祝福语简短
17 拜年红包的祝福语简短
18 妈妈生日祝福语简短励志