+ 11
Attribute
How can I create a attribute to an new element in JavaScript?
1 ответ
+ 6
use
createAttribute
https://www.w3schools.com/jsref/met_document_createattribute.asp
setAttribute
https://www.w3schools.com/jsref/met_element_setattribute.asp