可能是最簡(jiǎn)潔的回答了
<script?type="text/javascript">??var?attime;??function?clock(){????var?time=new?Date();??????????????attime=?time.getHours().toString()+":"+time.getMinutes().toString()+":"+time.getSeconds().toString()?;????document.getElementById("clock").value?=?attime;??}??setInterval(clock,1000);</script>
2021-06-13
<script type="text/javascript">
? var attime;
? function clock(){
? ? var time=new Date();
? ? var myarr=time.split(" ");
? ? attime=myarr[4];
? ? document.getElementById("clock").value = attime;
? }
? setInterval(clock,1000);
</script>
2020-05-27
?setInterval(clock,1000);?