Javascript获取远程图片宽高
<script language="javascript"> function getMeta(varA, varB) { if (typeof varB !== 'undefined') { alert(varA + ' width ' + varB + ' height'); } else { var img = new Image(); img.src = varA; img.onload = function() { getMeta(this.width, this.height); } } } getMeta("https://www.hackhp.com/xxxxxx.jpg");//自己修改图片地址 </script>