企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[![Uploadify - JQuery File Upload Plugin Script](https://box.kancloud.cn/2015-11-02_5636cc82d8b6c.png)](http://www.uploadify.com) # onSelect Input Type:**function** Input Format:**function(event,ID,fileObj) {}** Required:**optional** The **onSelect** option allows you to run a custom function for each file when being added to the queue. The default function creates a new queue item for the file and places it in the queue. If the custom function returns **false**, the default function will not run. ### Arguments **event **The event object. **ID **The unique identifier of the file that was selected.**** **fileObj **An object containing details about the file that was selected. - **[name]** - The name of the file**** - **[size]** - The size in bytes of the file**** - **[creationDate]** - The date the file was created**** - **[modificationDate]** - The last date the file was modified**** - **[type]** - The file extension beginning with a '.' ### Demo Javascript Code 1. $('#file_upload').uploadify({ 1.   'uploader'    : '/uploadify/uploadify.swf', 1.   'script'      : '/uploadify/uploadify.php', 1.   'cancelImg'   : '/uploadify/cancel.png', 1.   'folder'      : '/uploads', 1.   'multi'       : true, 1.   'onSelect'    : function(event,ID,fileObj){ 1.       alert('The file ' + fileObj.name + ' was added to the queue.'); 1.     } 1. }); HTML Code 1. <inputtype="file"id="file_upload"name="file_upload"/> 1. <ahref="javascript:$('#file_upload').uploadifyUpload();">Upload Files</a> [Upload Files](#) [![Download the Latest Version](https://box.kancloud.cn/2015-11-02_5636cc82ea7d9.png)](#) Help keep Uploadify free and support the development of other excellent apps! ![](../image/564003e16d205.gif) [home](#)  |  [about](#)  |  [download](#)  |  [demos](#)  |  [documentation](#)  |  [faqs](#)  |  [forums](#) ©2011 by [Reactive Apps](http://www.reactiveapps.com)