javascript create span with class 在 How to add the <span> by javascript? [duplicate] - Stack ... 的評價
Create a DOM node: var newSpan = document.createElement('span');. Set the class. newSpan.setAttribute('class', 'ABC');. Add the span to ... ... <看更多>