头像上传问题(急急急)
我上传的时候 老是出错。求大侠救命啊。
$generate.click(function() {
var me = $(this);
me.fadeOut();
$opts.fadeOut();
$cutter.fadeOut();
$info.hide();
$processed.fadeIn();
$.ajax({
url: 'scissors.axd',
dataType: 'json',
data: {
action: 'GenerateBitmap',
src: ps.src,
zoom: $bcglobal.$zoomValue,
x: $thumbimg.f('left'),
y: $thumbimg.f('top'),
width: ps.cutterSize.width,
height: ps.cutterSize.height,
t: Math.random()
},
error: function(err) {
alert('cant generate it!');
},
success: function(json) {
if (json.msg == 'success') {
me.fadeIn();
$opts.fadeIn();
$cutter.fadeIn();
$info.show();
$processed.fadeOut();
$newimg.attr('src', json.src).show();
ps.onGenerated(json.src);
}
else {
alert(json.msg);
}
}
});
});
$bcglobal.$cutter = $cutter;
$bcglobal.$img = $img;
$bcglobal.$thumbimg = $thumbimg;
});
}
});