js实现时间的显示
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>showTime</title>
<script>
function myTime(){
document.getElementById('demo').innerHTML = Date();
}
</script>
</head>
<body>
<input type="submit" value="显示时间" onclick="myTime()">
<p id="demo"></p>
</body>
</html>