DrHuang.com | list | math | function | coding | graphics | example | help | ? | 中文
+ + + =

X

Save Your Code

If you click the save button, your code will be saved, and you get an URL you can share with others.

By clicking the "Save" button you agree to our terms and conditions.

Report Error

X

Save to Google Drive

If you have a Google account, you can save this code to your Google Drive.

Google will ask you to confirm Google Drive access.

X

Open from Google Drive

If you have saved a file to Google Drive, you can open it here:

File Save Orien Theme Result Size: 300 x 150
x
 
<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 $$
X

Report a Problem: