有没有人请帮助我它的银色............:)
答案 0 :(得分:1)
您可以使用纯Javascript:
var img = document.getElementById('imageInQuestion');
var width = img.clientWidth;
var height = img.clientHeight;
编辑(通过jQuery(虽然未经测试))
var imgWidth = $("#imageInQuestion").width();
var imgWidth = $("#imageInQuestion").height();
我假设按尺寸,你的意思是尺寸,如果我错了,请纠正我。
答案 1 :(得分:0)
试试这个
$('#imageId').clone().removeAttr("height").attr("height");