Processing Methods and code _ javascript skills for images on webpages

Source: Internet
Author: User
Inspired by the comments in an alt attribute article of an image yesterday, the author briefly summarized some of the Processing Methods of images on the webpage.


2. automatically zoom out the image
Some images are often large, and the uploaded images will fill the screen. The following example detects the image width. If the image width is greater than "screen width-350 ",

The image will be displayed with the size of "screen width-350.

Source image

Set the size of the graph
Screen. width-350) this. width = screen. width-350 ">

3 disable auto-scaling of large-sized images in IE6

The source image is automatically reduced.
  
Set not to zoom in
  



4. Remove the region wireframes and hyperlinks on the hotspot map.

The Code is as follows:


 



5. You can control the size of the uploaded image.


Processing the JS of the uploaded image size

The Code is as follows:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.