The Image object has a few other properties as well. Most of them are read-only properties that simply mirror attributes of the <IMG> tag that created the image. The width, height, border, hspace, and vspace properties are read-only integers that specify the size of the image, the width of its border, and the size of its horizontal and vertical margins. These properties are set by the attributes of the IMG tag which share their names.
Finally, the lowsrc property of the Image object mirrors the LOWSRC attribute of the IMG tag. It specifies the URL of an optional image to display when the page is viewed on a low-resolution device. The lowsrc property is a read/write string, like src is, but unlike the src property, setting lowsrc does not cause the browser to load and display the newly-specified low-res image. If you want to perform an animation, or some other special effect, that works with low-resolution images as well as high-resolution, then always remember to update the lowsrc property before you set the src property. If the browser is running on a low-resolution device when you set the src literal, it will load the new lowsrc image instead.
file: /Techref/language/java/script/definitive/ch16_04.htm, 4KB, , updated: 2019/10/14 15:00, local time: 2024/11/22 20:25,
3.145.68.167:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/language/java/script/definitive/ch16_04.htm"> [Chapter 16] 16.4 Other Image Properties</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.