最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
jquery javascript获取图片的宽高代码
时间:2022-06-25 14:45:40 编辑:袖梨 来源:一聚教程网
jquery例子
var img = $(‘#imageid');
var theimage = new image();t
heimage.src = img.attr(“src”);
alert(“width: ” + theimage.width);
alert(“height: ” + theimage.height);
js例子
var img = new image();
img.onload = function(){
宽度=this.width
高度=this.height
}
img.src = 图片地址;
相关文章
- 我的御剑日记第九章祭坛怎么过 05-09
- 《哈迪斯2》羊毛材料获取方法 05-09
- 《夜族崛起》恶魔城ps5介绍 05-09
- 《夜族崛起》pvp加入方法 05-09
- 《庄园领主》民兵装备介绍 05-09
- 《夜族崛起》蚕获得方法 05-09