<script type="text/javascript"> var div = document.documentElement; (function(){ div.style.background = 'red'; }()); </script>