setAttribute 猫腻

setAttribute 这个方法一定要注意,有三个参数
object.setAttribute(sName, vValue [, iFlags])

last arg
iFlags: Optional. Integer that specifies one the following flags: 0 When the attribute is set, it overwrites any attributes with the same name, regardless of their case. (替换已经存在的)
1 Default. The case of the attribute that you set is respected when it is set on the object.(直接添加)

你可能感兴趣的:(attribute)