How to
<input type="file">
I get the file URL through ajax and assign a value to the files attribute of the input. It has the same effect as clicking the input to select a local file. How to do it?
PHP中文网2017-05-16 13:25:13
$.ajax(...,function(url){
var a =document.createElement("A");
a.innerHTML = 'Link';
a.setAttribute("href",url);
document.body.appendChild(a);
})