- JScript code
SWFUpload.onload = function () { alert("hello"); var settings = { flash_url : "../swfupload/swfupload.swf", upload_url: "upload.php", post_params: { "PHPSESSID" : "NONE", "HELLO-WORLD" : "Here I Am", ".what" : "OKAY" }, file_size_limit : "100 MB", file_types : "*.jpg;*.gif;*.png;*.jpeg;", 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 : "XPButtonUploadText_61x22.png", button_placeholder_id : "spanButtonPlaceholder", button_width: 61, button_height: 22, // The event handler functions are defined in handlers.js swfupload_loaded_handler : swfUploadLoaded, 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 : uploadSuccess, upload_complete_handler : uploadComplete, queue_complete_handler : queueComplete, // Queue plugin event // SWFObject settings minimum_flash_version : "9.0.28", swfupload_pre_load_handler : swfUploadPreLoad, swfupload_load_failed_handler : swfUploadLoadFailed }; swfu = new SWFUpload(settings); }
我希望这个函数在某个radio被选中后触发,假设那个radio的onclick="display( )",该怎样改这段代码?
------解决方案--------------------
只要这样就好了
<input type="radio" onclick="display();SWFUpload.onload();"/>触发按钮
------解决方案--------------------
SWFUpload.onload = function () { 改为function display(){}不知道行不行?
------解决方案--------------------
------解决方案--------------------
var display = function () {
alert("hello");
var settings = {
flash_url : "../swfupload/swfupload.swf",
upload_url: "upload.php",
post_params: {
"PHPSESSID" : "NONE",
"HELLO-WORLD" : "Here I Am",
".what" : "OKAY"
},
file_size_limit : "100 MB",
file_types : "*.jpg;*.gif;*.png;*.jpeg;",
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 : "XPButtonUploadText_61x22.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 61,
button_height: 22,
// The event handler functions are defined in handlers.js
swfupload_loaded_handler : swfUploadLoaded,