getAttribute(), setAttribute(), attributes

以前只是会注意到getAttribute与setAtrribute方法,没有用过attributes属性。

attributes返回节点属性的集合,你可以用length查看属性的长度,或者直接遍历这个集合

posted @ 2017-07-14 10:27  欢乐之家  阅读(254)  评论(0编辑  收藏  举报