JS 操作属性

var s = document.getElementById(“txtUserName”);
alert ( s.value ); alert(s.id);
直接操作。
onclick = “this.style.backgroundColor=’#FF0000′

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注