我已经创建了文件上传功能。我得到文件名和文件类型,不知道如何使用动态控制显示图像!如何在文件上载动态显示图像
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