关于JS中new date 函数的问题
发布网友
发布时间:2022-05-03 05:48
我来回答
共4个回答
热心网友
时间:2022-05-14 17:52
这样:
<div id="linkweb"></div>
<script>
function d(){
var d= new Date();
return d.toDateString().replace(d.getYear(),"")+d.toTimeString().replace("UTC+0800","");
}
setInterval("linkweb.innerHTML=d();",1000);
</script>
热心网友
时间:2022-05-14 19:10
<div id="linkweb"></div>
<script>
function d(){
var d= new Date();
return d.toDateString().replace(d.getYear(),"")+d.toTimeString().replace("UTC+0800","");
}
setInterval("linkweb.innerHTML=d();",1000);
</script>
来源:GeX08EqG78jOZt5ye4FkhPAQQRRnsF3u1w3vWd0Rj92aHqQhde9DQY14iZ9rzb046oMeK8l6G8SdJXI9s4jcYK
热心网友
时间:2022-05-14 20:44
<div id="linkweb"></div>
<script type="text/javascrpt">
var nowtime;
var date = new Date();
nowtime = date.getYear()+'-'+date.getMonth()+'-'+date.getDay()+' '+date.getHours()+':'+date.getMinutes()+':'+date.getSeconds();
</scrpt>
热心网友
时间:2022-05-14 22:36
<div id="linkweb"></div>
<script>
function d(){
var d= new Date();
return d.toDateString().replace(d.getYear(),"")+d.toTimeString().replace("UTC+0800","");
}
setInterval("linkweb.innerHTML=d();",1000);
</script>