The current date & time is:<br />
<script>
var display=setInterval(function(){Time()},0);
<p id="currentdate"></p>
<p id="currenttime"></p>
<p id="currentdatetime"></p>
function Time()
{
var date=new Date();
var time=date.toLocaleTimeString();
var date1=date.toLocaleDateString();
document.getElementById("currentdate").innerHTML=date1;
document.getElementById("currenttime").innerHTML=time;
document.getElementById("currentdatetime").innerHTML=date;
}
</script>
展示結果
The current date & time is:
沒有留言:
張貼留言