📜  使用 javascript 代码示例在 html 标记上添加新属性

📅  最后修改于: 2022-03-11 15:03:04.695000             🧑  作者: Mango

代码示例3
// Here's what you do for the style attribute
span.setAttribute("style", "width:110%;float:center;left-margin:-10px;top-margin:-10;");