我正在尝试制作一个使用时间发布的表格。我设法计算了时间。我想输入一个特定的时间来发布等。12:00。是否可以?
<html>
<head>
</head>
<body>
<span id="remain"></span>
<form action="3.php" method="post" id="form1" name="form1">
<input type="text" name="id">
<input type="submit" name="Go" value="submit">
</form>
<script type="text/javascript">
window.onload=counter;
function counter() {
seconds = 150;
countDown();
}
function countDown(){
document.getElementById("remain").innerHTML=seconds;
setTimeout("countDown()",1000);
if(seconds == 0) {
document.form1.submit();
}else {
seconds--;
}
}
</script>