我有以下代码隐藏按钮,但我想在24小时后再次显示该按钮。我该怎么做?
<input type="button" id="points" value="Points" onClick="action();" />
<script>
var hidden = false;
function action() {
hidden = !hidden;
if(hidden) {
document.getElementById('points').style.visibility = 'hidden';
}
}
</script>
答案 0 :(得分:-1)
<input type="button" id="toggler" value="Toggler" onClick="action();" />
<input type="button" id="togglee" value="Togglee" />
<script>
var hidden = false;
function action() {
hidden = !hidden;
if(hidden) {
document.getElementById('togglee').style.visibility = 'hidden';
} else {
document.getElementById('togglee').style.visibility = 'visible';
}
}
</script>