i have the simple code below to display a random image; how can i modify this line to place the random image at 225px wide by 141px high?
Code JavaScript:document.getElementById("highlight_1").src = randomimage1;
thanks!
| SitePoint Sponsor |
i have the simple code below to display a random image; how can i modify this line to place the random image at 225px wide by 141px high?
Code JavaScript:document.getElementById("highlight_1").src = randomimage1;
thanks!
Last edited by paul_wilkins; Jun 14, 2011 at 16:30. Reason: replaced the code-review summary

If you want the image to be those dimensions, you need to set height and width via the style object.
Last edited by paul_wilkins; Jun 14, 2011 at 16:31.
Bookmarks