<h2 id="h2"> DrHuang First JavaScript
<br>
黄博士第一个程序
</h2>
<button onclick="myFunction()"> display time 显示时间 Change color 改变颜色
</button>
<button type="button"
onclick="setInterval('myFunction()',1000)">
auto refresh time 自动刷新时间 Change color 改变颜色
</button>
<script>
function myFunction() {
var x = document.getElementById("h2");
x.style.fontSize = "40px";
x.style.color = "red";
document.getElementById('demo').innerHTML = Date();
}
</script>
<p id="demo"></p>
LaTeX is between $$ x^6 $$