dojo/dom-attr

http://dojotoolkit.org/reference-guide/1.9/dojo/dom-attr.html#dojo-dom-attr

主要方法:has()、 get() 、set() 、 remove()、 getNodePop()

1.has()

A function that checks if an attribute is present on a DOM node, and returns the truthy value if it is there, and falsy value otherwise.

2.set()

A function that handles normalized setting of attributes on DOM Nodes.

3.remove()

Is a function that removes an attribute from a DOM node. It is modeled after DOM’s removeAttribute, but unlike the latter it normalizes standard attribute names to smooth over differences between browsers, or to provide convenient aliases, (e.g., className is aliased to class).

是一个函数,删除一个属性从一个DOM节点。是仿照DOM removeAttribute,但与后者它规范化标准属性名称来缓和浏览器之间的差异,或提供方便的别名

4.getNodeProp()

Is a companion function for domAttr.get. Unlike the latter it favors properties falling back on attributes, if a property was not present 是一个同伴domAttr.get函数。如果没有一个属性,它支持属性对属性回落

posted @ 2014-01-19 11:29  刘朝样  阅读(244)  评论(0)    收藏  举报