weixin_33704591 2018-01-21 23:55 采纳率: 0%
浏览 23

上载按钮开始

i use the uploadifive script to upload files:

    <script type="text/javascript">
    <?php $timestamp = time();?>
    $(function() {
        $('#file_upload').uploadifive({
            'auto'             : false,
            'checkScript'      : 'check-exists.php',
            'formData'         : {
                                   'timestamp' : '<?php echo $timestamp;?>',
                                   'token'     : '<?php echo md5('unique_salt' . $timestamp);?>'
                                 },
            'queueID'          : 'queue',
            'uploadScript'     : 'uploadifive.php',
            'onUploadComplete' : function(file, data) { console.log(data); }
        });
    });
</script>

Originally it starts working with this link:

<a style="position: relative; top: 8px;" href="javascript:$('#file_upload').uploadifive('upload')">Upload Files</a>

But i have a button:

<input type="button" id="start_upload" name="uploadenFormSend" value="Bestand(en) uploaden" class="button-pink">        

I want the script to start uploading when people press the button. How can i arrange this?

  • 写回答

0条回答 默认 最新

    报告相同问题?