Javascript DOM HTML Document write() Method write object

Introduction

Write the Date object directly to the HTML document:

document.write(Date());

View in separate window

<!DOCTYPE html>
<html>
<body>

<h1>Hello World</h1>

<script>
document.write(Date());//from w  w w .  ja  v a 2 s. c o  m
</script>

</body>
</html>



PreviousNext

Related