You can programmatically get the image and check the dimensions using Javascript...(您可以使用Javascript以编程方式获取图像并检查尺寸...)
var img = new Image(); img.onload = function() { alert(this.width + 'x' + this.height); } img.src = 'http://www.google.com/intl/en_ALL/images/logo.gif';
This can be useful if the image is not a part of the markup.(如果图像不是标记的一部分,这将很有用。) 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…