[英]Remove dynamically added input file IE8
我正在嘗試使用IE8上的jquery.1.9.1刪除一個動態添加的input type file
。 通過克隆原始input
此input
將添加到隱藏的form
。
使用IFrame克隆上傳文件的參考 : 將文件API入侵IE8
// Where file.value is an arbitrary string
var input = $('#formupload input[data-file="' + file.value + '"]');
//does nothing, the element still inside the HTML document
input.remove();
當我記錄日志或發出警報時,選擇器的結果將返回object
。
我在這里想念什么? 這僅適用於IE8,用於文件上傳,用於其他瀏覽器。
您無法清除文件輸入。 您必須將其刪除並重新初始化。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.