js怎么设置按钮隐藏
收起
云计算小粉
2018-05-10 19:59:58
1541
0
1
条回答
写回答
取消
提交回答
-
function DisplayAndHiddenBtn(btnId, type) {
var currentBtn = document.getElementById(btnId);
if (type == "d") {
currentBtn.style.display = "block"; //style中的display属性
}
else if (type == "h") {
currentBtn.style.display = "none";
}
}
2019-07-17 22:10:39