0
画像を添付しました。画像の下の「X」アイコンをクリックしようとするとファイルを削除できますが、「ファイルの選択」の右側のファイル名は表示されます。誰でも私に戻ってそれをリセットする方法を教えてもらえますか?
次のコードを使用してイメージを削除しています。
$('div').on('click', '.closeDiv', function(e){
var closest = $(this).closest('td');
var id = closest.find('div:first');
$(this).prev().remove();
$(this).remove();
closest.find('span:first').html('');
$('#'+id).val("");
})
[クリアのを使用してjQueryの(http://stackoverflow.com/questions/1043957/clearing-input-type-fileを-using-jquery) –
[JavaScriptを使用してHTMLファイルの入力をクリアするにはどうすればよいですか?](http://stackoverflow.com/questions/1703228/how-can-i-clear-an-html-file-input-with- javascript) –