swfupload学习

JS中加入如下代码,其中一些参数按自己需要更改
var swfu;
	window.onload = function() {
		swfu = new SWFUpload({
			flash_url : "${ctx}/js/swfupload/js/swfupload.swf",
			upload_url: "${ctx}/common/attach!multipleUploadSubmit.do",
			//upload_url: "http://127.0.0.1:8080/up/PictureAction.action",
			
			post_params: {"attach.jobno" : "${jobno}","attach.cjdjh":"${cjdjh}"},
			file_post_name: "atch",
			file_size_limit : "100 MB",
			file_types : "*.*",
			file_types_description : "All Files",
			file_upload_limit : 100,
			file_queue_limit : 0,
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},
			debug: false,
			// Button settings
			button_image_url: "${ctx}/js/swfupload/images/TestImageNoText_103x24.png",
			button_width: 103,
			button_height: 24,
			button_placeholder_id: "spanButtonPlaceHolder",
			button_text: '<span class="theFont"></span>',
			button_text_style: ".theFont {font-size: 12; cursor:pointer;border:1px solid #eee;}",
			button_text_left_padding: 12,
			button_text_top_padding: 3,
			
			// The event handler functions are defined in handlers.js
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadMySuccess,
			upload_complete_handler : uploadComplete,
			//queue_complete_handler : uploadComplete	// Queue plugin event
		});
     };
html代码,其中<span style="font-family: Arial, Helvetica, sans-serif;">spanButtonPlaceHolder是必要的</span>

<div>
										<span id="spanButtonPlaceHolder"></span>
									</div>
									<div class="mtp05">
										<input type="button" id="ss" class="ui_bton ui_bton_upload" value="上传选中文件" />
									</div>
									<div>
										<input type="button" id="btnCancel" class="ui_bton ui_bton_delete" disabled="disabled" value="取消上传队列" onclick="swfu.cancelQueue();" />
									</div>
								</td>
								<td> 
									<div class="fieldset flash" id="fsUploadProgress">
										
									</div>


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值