手敲代码01
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>javascript</title>
<script>
function displayDate(){
document.getElementById("demo").innerHTML=Date();
}
</script>
</head>
<body>
<h1>我的程序01</h1>
<p id="demo">点击按钮,显示时间<p>
<button type="button" onclick="displayDate()"></button>
</body>
</html>