📜  在 javascript 代码示例中设置属性

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

代码示例6
//Fetch id from html
var a = document.getElementById("id");

//variable.setAttribute("Attributes","Properties:Values")
a.setAttribute("style", "visibility:hidden;");