function resizeDiv(){ var tmpDiv = document.getElementById("testDiv").style; for (var x = 100; x <= 200; x++){ tmpDiv.width = x+"px"; } }