reference body js

JavaScript
var body = document.getElementsByTagName("BODY")[0]; //bad way
document.body //good way
Source

Also in JavaScript: