这里input标签怎么获取不了静态时分秒
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<script>
var date = new Date();
var hh=date.getHours();
if(hh<10) hh='0'+hh;
var mm=date.getMinutes();
if(mm<10) mm='0'+mm;
var yy=date.getSeconds();
if(yy<10) yy='0'+yy;
var time=hh+":"+mm+":"+yy;
document.getElementById("input").value=time;
</script>
</head>
<body>
<input type="text" id="input" />
</body>
</html>