JavaScript 图片上传预览效果(13)

时间:2025-03-09

该文档说了怎么在页面做图片预览, 一步一步的

default :

return this._simpleData;

}

},

//滤镜数据获取程序

_filterData: function() {

this.file.select();

try{

return document.selection.createRange().text;

} finally { document.selection.empty(); }

},

//domfile数据获取程序

_domfileData: function() {

return this.file.files[0].getAsDataURL();

},

//远程数据获取程序

_remoteData: function() {

this._setUpload();

this._upload && this._upload.upload();

},

//一般数据获取程序

_simpleData: function() {

return this.file.value;

},

//设置remote模式的上传文件对象

_setUpload: function() {

if ( !this._upload && this.action !== undefined && typeof QuickUpload === "function" ) { var oThis = this;

this._upload = new QuickUpload(this.file, {

onReady: function(){

this.action = oThis.action; this.timeout = oThis.timeout;

var parameter = this.parameter;

parameter.ratio = oThis.ratio;

parameter.width = oThis.maxWidth;

parameter.height = oThis.maxHeight;

},

onFinish: function(iframe){

try{

oThis._preview( iframe.contentWindow.document.body.innerHTML ); }catch(e){ oThis._error("remote error"); }

},

onTimeout: function(){ oThis._error("timeout error"); }

});

JavaScript 图片上传预览效果(13).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219