多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[![Uploadify - JQuery File Upload Plugin Script](https://box.kancloud.cn/2015-11-02_5636cc82d8b6c.png)](http://www.uploadify.com) # onCancel Input Type:**function** Input Format:**function(event,ID,fileObj,data) {}** Required:**optional** The **onCancel** option allows you to run a custom function when a file upload is canceled. The default function removes the file item from the queue. This function will also fire for each file when the queue is cleared. 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 cancelled.**** **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 '.' **data** Details about the file queue. - **[fileCount]** 每 The total number of files left in the queue - **[allBytesTotal]** 每 The total number of bytes left for all files in the queue ### 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.   'onCancel'    : function(event,ID,fileObj,data){ 1.       alert('The upload of ' + fileObj.name + ' has been canceled!'); 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/564003e11a274.gif) [home](#)  |  [about](#)  |  [download](#)  |  [demos](#)  |  [documentation](#)  |  [faqs](#)  |  [forums](#) ©2011 by [Reactive Apps](http://www.reactiveapps.com)