Document write() Method - Write the Date object directly to the HTML document: - Javascript DOM

Javascript examples for DOM:Document write

Description

Document write() Method - Write the Date object directly to the HTML document:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<h1>Hello World</h1>

<script>
document.write(Date());/* w w w  .  j  av  a2  s  .c om*/
</script>

</body>
</html>

Related Tutorials