第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何在多個文件上傳器中啟用提交按鈕,直到出現(xiàn)條件?

如何在多個文件上傳器中啟用提交按鈕,直到出現(xiàn)條件?

慕哥6287543 2021-05-05 17:45:26
我正在做一個WebApp,在那里人們將上傳2張圖像,我需要通過python代碼來傳遞這些圖像。因此,我只想讓他們在上傳2張圖像后發(fā)送。但我無法將其推斷為我的情況:<!DOCTYPE html><html><head>    <link rel="stylesheet" type="text/css" href="https://unpkg.com/file-upload-with-preview@3.4.3/dist/file-upload-with-preview.min.css"></head><body>  <!-- Uploader --><div class="custom-file-container" data-upload-id="myImage">    <label>Upload your images <a href="javascript:void(0)" class="custom-file-container__image-clear" title="Clear Image">&times;</a></label>    <label class="custom-file-container__custom-file" >      <form id="upload-form" action="{{url_for('upload')}}" method="POST" enctype="multipart/form-data">      <input type="file" class="custom-file-container__custom-file__custom-file-input" accept="image/*" aria-label="Choose File" multiple>      <input type="hidden" name="MAX_FILE_SIZE" value="10485760" />      <span class="custom-file-container__custom-file__custom-file-control"></span>    </label>    <div class="custom-file-container__image-preview"></div></div><input type="submit" name="send" disabled/></div><script src="https://unpkg.com/file-upload-with-preview@3.4.3/dist/file-upload-with-preview.min.js"></script><script>      var upload = new FileUploadWithPreview('myImage', {showDeleteButtonOnImages: true, text: {chooseFile: 'Nom del fitxer', browse: 'Examina'}})</script><script src="https://code.jquery.com/jquery-1.9.1.min.js"></script><script>$(document).ready(    function(){        $('input:file').change(            function(){                if ($(this).val()) {                    $('input:submit').attr('disabled',false);;                 }             }            );    });</script></body></html>添加的最后一個腳本是第一個鏈接中給出的解決方案,它可以正常工作,但不是我想要的。文件上傳器代碼來自https://github.com/promosis/file-upload-with-preview,在這里我看到有一種稱為selectedFilesCount的方法可能有用。感謝您的時間,如果您在我的代碼中看到一些廢話,則感到抱歉,但是我是這些語言的新手...
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 110 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號