要给出不同的答案,可以使用不同的属性和属性值来修改元素的样式。以下是一些示例解决方法:
document.getElementById("a").style.backgroundColor = "red";
document.getElementById("a").style.color = "blue";
document.getElementById("a").style.borderWidth = "2px";
document.getElementById("a").style.width = "300px";
document.getElementById("a").style.height = "200px";
这些示例都是通过获取元素的id,并使用style
属性来修改元素的样式。可以根据具体的需求,使用不同的属性和属性值来修改元素的样式。