Skip to content

Instantly share code, notes, and snippets.

@foru17
Created April 16, 2014 04:08
Show Gist options
  • Save foru17/10805692 to your computer and use it in GitHub Desktop.
Save foru17/10805692 to your computer and use it in GitHub Desktop.
获得图片真实地址的方法
function checkFirstImg(){
$('<img/>').attr('src',$(imgChecked).attr('src')).load(function(){
firstImg_real_width=this.width;
firstImg_real_height=this.height;
console.log('宽度'+firstImg_real_width);
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment