HTML : JQuery와에
지우기 업로드 파일 이름
<input type="file" id="flIcon" />
:
<div id="uniform-flIcon" class="uploader">
<input id="flIcon" class=" " type="file" style="opacity: 0;">
<span class="filename" style="-moz-user-select: none;">document-save.png</span>
<span class="action" style="-moz-user-select: none;">Choose File</span>
</div>
나는 그것을 시도 : 페이지를로드 할 때 나는 방화범 볼
$('#btnAddNew').click(function(event) {
alert($("#flIcon").attr('file'));
$("div#flIcon").replaceWith("<input type='file' id='flIcon'/>");
});
이 심판에서. Clearing <input type='file' /> using jQuery하지만 그게 나를 위해 작동하지 않습니다. 거기에 어떤 브라우저 호환성 문제 또는 일부 실종입니다. 고마워요. 이 같은
의 $ ("#의 flIcon")와 잘 작동 replaceWith ('..').; 여기에서 --- http : //jsfiddle.net/XFyuw/3/ – mini
$ ('# btnAddNew'). ((function (event # {alert ($ # "FlIcon")); $ ("div # flIcon"). replaceWith ("");}); – Ohgodwhy