标签:
function css(target,styles){
for (var k in styles){
target.style[k]=styles[k];
}
}
示例:
var div = document.querySelector("div");
css(div,{width:300+"px",height: 400+"px",backgroundColor:green});
标签:
原文地址:http://www.cnblogs.com/f-y-z/p/5772384.html