原理:页面加载完了,图片不一定加载完了。
$(function(){ $("img").on("load",function(){ //核心 var w = $(this).width(); alert(w); }); });
原理:页面加载完了,图片不一定加载完了。
$(function(){ $("img").on("load",function(){ //核心 var w = $(this).width(); alert(w); }); });
转载于:https://www.cnblogs.com/candy-Yao/p/8615760.html