Has a best-practice around using setAttribute
instead of the dot ( .
) attribute notation been developed?
(是否已开发出围绕setAttribute
而不是点( .
)属性符号的最佳实践?)
Eg:
(例如:)
myObj.setAttribute("className", "nameOfClass");
myObj.setAttribute("id", "someID");
or
(要么)
myObj.className = "nameOfClass";
myObj.id = "someID";
ask by Francisc translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…