rotate a div using javascript

JavaScript
div.style.tranform = 'rotate(' + angleInDegrees + 'deg);';
Source

Also in JavaScript: