📜  设置 html 值 javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:52.393000             🧑  作者: Mango

代码示例1
To change the value of an HTML attribute, use this syntax:
document.getElementById(id).attribute = new value;

to set the value: 
document.getElementById("id").value = "New Value Text";