window.document

window.document is a BOM object that refers to the currently loaded document (page). Its methods and properties fall into the DOM category of objects.

Syntax
var doc = window.document
snippet
<!DOCTYPE html>
<html>
<head>
   <title>Welcome to Rookie Nerd!</title>
</head>
<body>

<script type="text/javascript">
   var doc = window.document;
   console.log(doc.title); // Welcome to Rookie Nerd!
</script>

</body>
</html>
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +