我已經創建了文件上傳功能。我得到文件名和文件類型,不知道如何使用動態控制顯示圖像!如何在文件上載動態顯示圖像
function AddFileUpload() {
var div = document.createElement('DIV');
div.innerHTML = '<input id="file' + counter + '" name = "file' + counter +
'" type="file"/>' +
'<input id="Button' + counter + '" type="button" ' +
'value="Remove" onclick = "RemoveFileUpload(this)" />';
document.getElementById("FileUploadContainer").appendChild(div);
counter++;
}
function RemoveFileUpload(div) {
document.getElementById("FileUploadContainer").removeChild(div.parentNode);
}
我假設你使用Apache2 + PHP作爲web服務器?知道回答你的問題很重要。 – Steini 2014-10-10 06:02:29
不知道Apache2 + PHP。我想知道如何在文件上傳中動態顯示選定的圖像在JavaScript上 – Rajesh 2014-10-10 06:29:45
對不起,你的問題不是很清楚。 – Steini 2014-10-10 06:44:01