JavaScript eksempel

PHOTO EMBED

Sat Sep 19 2020 12:05:39 GMT+0000 (Coordinated Universal Time)

Saved by @jaso110 #javascript #html

<!DOCTYPE html>
<html>
<body>
​
<h2>My First JavaScript</h2>
​
<button type="button"
onclick="document.getElementById('demo').innerHTML = Date()">
Click me to display Date and Time.</button>
​
<p id="demo"></p>
​
</body>
</html> 
​
content_copyCOPY

https://www.w3schools.com/js/tryit.asp?filename=tryjs_myfirst