Using Javascript to add width to a HTML element
问题 I am trying to work with altering a div tag's position and size with a JavaScript function and am confused about how to reference the current width of the div. This is my function function socialExt() { document.getElementById("Left").style.width = ("Left").width+240px; } I want it to add 240 pixels every time I click on the button. What should I replace ("Left").width with in order to access its width so I can add 240px to it I am also currently not using JQuery, should I use it? 回答1: Quick