HTML5仿微博图片上传后大小选择,请使用chrom或者FireFox运行、如果报SECURITY_ERR需要把文件放在服务器端、比如nginx里。
1.[代码][HTML]代码
New Document180×180
100×100
50×50
30×30
var photo={
"this":document.getElementById("photo"),
"context":document.getElementById("photo").getContext("2d"),
"width":document.getElementById("photo").width,
"height":document.getElementById("photo").height
};
var photos={
"bPhoto":{
"context":document.getElementById("bPhoto").getContext("2d"),
"width":document.getElementById("bPhoto").width,
"height":document.getElementById("bPhoto").height
},"mPhoto":{
"context":document.getElementById("mPhoto").getContext("2d"),
"width":document.getElementById("mPhoto").width,
"height":document.getElementById("mPhoto").height
},"sPhoto":{
"context":document.getElementById("sPhoto").getContext("2d"),
"width":document.getElementById("sPhoto").width,
"height":document.g