jQuery, 網站技術

[jQuery] 取得圖片真正的寬度和高度

圖片一定要載入完成才能知道它的寬度和高度,因此在 jquery 中,建議用 load 來取得相關的資訊,例如:$(‘img’).load()

More