If I were writing a JavaScript line to set a style attribute of an element it could look like this (this example: \"width\"):
document.getElementById(\'myDiv
One possibility would to use for example jquery, to make it easy. If you want a pure javascript solution, then read this: http://www.javascriptkit.com/javatutors/setcss3properties.shtml