日期:2014-05-16 浏览次数:20418 次
$(document).ready(function() {
alert("aaaaaaaaaaa");
SWFUploadInit(); //初始化Flash上传组件
});
window.onload=function(){
alert("bbbbbbbb");
}
function SWFUploadInit(){
var kbid = $("#hidKbId").val();
var settings = {
flash_url: "/js/swfupload/swfupload.swf",
upload_url: "KB_EditNew.aspx?act=swfupload&attachcat=KB&kbid="+kbid,
post_params: { "PHPSESSID": "" },
file_size_limit: "1024 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: "/js/swfupload/btn_attach.png",
button_width: "85",
button_height: "28",
button_placeholder_id: "spanButtonPlaceHolder",
//button_text: '<a class=""></a>',
//button_text_style: ".theFont { cursor: pointer; }",
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: uploadSuccess20,
queue_complete_handler: queueComplete // Queue plugin event
};
swfu = new SWFUpload(settings);
}