处理用户上传图片大小不一,前台显示的问题:
function
imgonLoad()
...
{
var w = this.width;
var h = this.height;
var i = this.i;
//alert(w+'=='+h+'====='+i);
if(125*h/w>130)...{
document.getElementById('pic'+i).height=130;
document.getElementById('pic'+i).width=125*w
var w = this.width;
var h = this.height;
var i = this.i;
//alert(w+'=='+h+'====='+i);
if(125*h/w>130)...{
document.getElementById('pic'+i).height=130;
document.getElementById('pic'+i).width=125*w