評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 1,平均評等: 5]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>標題</title>
</head>
<body>
<button type="button" id="send" onclick="$(this).attr('disabled', true);window.setTimeout(setDisabled, 30000);setstr(30);" >送出<span id="str"></span></button>
</body>
<script
src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs="
crossorigin="anonymous"></script>
<script>
function setDisabled() {
document.getElementById('send').disabled = false;
}
function setstr(s) {
document.getElementById("str").innerHTML=s;
s -= 1;
if(s>=0){
setTimeout(setstr,1000,s);
}else{document.getElementById("str").innerHTML='';}
}
</script>
</html>
評等結果
點擊便能為這篇文章進行評等!
[評等總次數: 1,平均評等: 5]