• 文件上传[Uploadify]


    Uploadify文件上传插件

    Uploadify简单说来,是基于Jquery的一款文件上传插件。它的功能特色总结如下:

    1. 支持单文件或多文件上传,可控制并发上传的文件数
    2. 在服务器端支持各种语言与之配合使用,诸如PHP,.NET,Java……
    3. 通过参数可配置上传文件类型及大小限制
    4. 通过参数可配置是否选择文件后自动上传
    5. 易于扩展,可控制每一步骤的回调函数(onSelect, onCancel……)
    6. 通过接口参数和CSS控制外观

     http://www.uploadify.com/demos/

    案例:http://demo.swfupload.org/v220/index.htm

    代码截图:

     

    <script type="text/javascript">
    		var swfu;
    		window.onload = function () {
    			swfu = new SWFUpload({
    				// Backend Settings
    				upload_url: "upload.php",
    				post_params: {"PHPSESSID": "4a5922ll546csgthmlpmogbvo7"},
    
    				// File Upload Settings
    				file_size_limit : "2 MB",	// 2MB
    				file_types : "*.jpg",
    				file_types_description : "JPG Images",
    				file_upload_limit : "0",
    
    				// Event Handler Settings - these functions as defined in Handlers.js
    				//  The handlers are not part of SWFUpload but are part of my website and control how
    				//  my website reacts to the SWFUpload events.
    				file_queue_error_handler : fileQueueError,
    				file_dialog_complete_handler : fileDialogComplete,
    				upload_progress_handler : uploadProgress,
    				upload_error_handler : uploadError,
    				upload_success_handler : uploadSuccess,
    				upload_complete_handler : uploadComplete,
    
    				// Button Settings
    				button_image_url : "images/SmallSpyGlassWithTransperancy_17x18.png",
    				button_placeholder_id : "spanButtonPlaceholder",
    				button_ 180,
    				button_height: 18,
    				button_text : '<span class="button">Select Images <span class="buttonSmall">(2 MB Max)</span></span>',
    				button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
    				button_text_top_padding: 0,
    				button_text_left_padding: 18,
    				button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
    				button_cursor: SWFUpload.CURSOR.HAND,
    				
    				// Flash Settings
    				flash_url : "../swfupload/swfupload.swf",
    
    				custom_settings : {
    					upload_target : "divFileProgressContainer"
    				},
    				
    				// Debug Settings
    				debug: false
    			});
    		};
    	</script>
    


  • 相关阅读:
    python中字典排序,列表中的字典排序
    Python模块:operator简单介绍
    java 物理资源回收 finally与try
    Eclipse相对路径
    java Lambda
    java 匿名内部类
    java File类
    java单例类
    java 创建子类
    jvm运行时数据区域
  • 原文地址:https://www.cnblogs.com/james1207/p/3339394.html
Copyright © 2020-2023  润新知