1

だから私は次のhtmlを持っています:

<div id="#course_logo_container" class="fileupload fileupload-new" data-provides="fileupload">
    <div class="fileupload-preview fileupload-exists thumbnail" style="width: 200px; height: 150px; max-width: 200px; max-height: 150px; line-height: 20px;">
        <img src="http://www.placehold.it/200x150/EFEFEF/AAAAAA&text=no+image" /> 
    </div>
    <div>
        <span>
            <span class="fileupload-new">Select image</span>
            <span class="fileupload-exists">Change</span><input type="file" />
        </span>
    </div>
</div>

そして、bootstrap-fileupload.js を頭に追加しました。

私の問題は、画像を選択してから別の画像を選択しようとしてアクションをキャンセルすると、画像タグが削除され、最後の画像が削除されることです。

そのため、この動作を防ぐことができるいくつかの js API について、ブートストラップのドキュメントを検索しましたが、何も見つかりませんでした。

誰かがそれをどこで見つけることができるか教えてもらえますか?

4

0 に答える 0