[英]How do I fetch displayed time when user clicks submit button
I have this code which displays present time.我有显示当前时间的代码。 User clicks submit button and the exact present time should get saved in mysql table.
用户单击提交按钮,准确的当前时间应保存在 mysql 表中。 But I cant figure out how to do it.
但我不知道该怎么做。
<!DOCTYPE html>
<html>
<style>
p{font-family:Verdana;}
</style>
<body>
<p>The Current time is:</p>
<p id="example"></p>
<script>
var display=setInterval(function(){Time()},0);
function Time()
{
var date=new Date();
var time=date.toLocaleTimeString();
document.getElementById("example").innerHTML=time;
}
</script>
</body>
</html>
Lets the user clicks "SUBMIT" button at time 8:02:43 PM, then this time should get stored in mysql table called time
让用户在 8:02:43 PM 时间单击“提交”按钮,然后这个时间应该存储在 mysql 表中,称为
time
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.