I am trying to change the width and height of a DIV dynamically using variables in javascript. My code below is not working for me.
div_canvas.setAttribute('style', "width: '+w_resized+'px");
div_canvas.setAttribute('style', "height: '+h_resized+'px");
Where w_resized and h_resized are variables.
div_canvas.style.width = w_resized + 'px';div_canvas.style.height = h_resized + 'px';