document 对象后续

<input type="button" valu="按钮" name="c "/>

var a = document.getElementsByName("c")

<input type = "text" id="b"/>

var c = document.getElementsById("b");

c.value = "nihojo";

操作样式(只能操作内联)
var a = document.getElementsById("c");
a.style.color
。修改背景色
a.style.backgroundColor = "green";

  

  

原文地址:https://www.cnblogs.com/cy960202/p/8687087.html