how to turn a page upside down in javascript

JavaScript
document.getElementsByTagName('body')[0].style.transform = 'rotate(180deg)';
Source

Also in JavaScript: