document.write("hello"); document.getElementById("p1").style.color="blue";
3 回答

刚毅87
TA贡献345条经验 获得超309个赞
document.write("hello") :在页面中写入 hello;
document.getElementById("p1"):id 名为p1的元素;
document.getElementById("p1").style.color="blue";:id 名为p1的元素的颜色为蓝色.
添加回答
举报
0/150
提交
取消