怎么把div里style=margin-left去掉
3 回答

MM们
TA贡献1886条经验 获得超2个赞

慕工程0101907
TA贡献1887条经验 获得超5个赞
先给div指定一个id;
document.getElementById('divID').removeAttribute("style"); //清除所有样式
document.getElementById('divID').style.marginLeft = "0";
添加回答
举报
0/150
提交
取消