Home > Web Front-end > JS Tutorial > jquery solves the problem of getting the length and width of images under Chrome_javascript skills

jquery solves the problem of getting the length and width of images under Chrome_javascript skills

WBOY
Release: 2016-05-16 17:40:06
Original
1154 people have browsed it

I encountered a problem where I needed to get the length and width of an image. It works fine under IE and FireFox, but it doesn't work in Chrome. Someone on the Internet said it can, and then it comes down to whether it is a problem with the Chrome version.
Finally, I found the answer.

In most cases, put the js code behind the image tag:

Copy the code The code is as follows :


Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template