I want to configure a file input button, so I use this code to create a file input element
function inputBtn(){ var input=document.createElement('input'); input.type="file"; setTimeout(function(){ $(input).click(); },200); } <button id="ifile" onclick="inputBtn()">create</button>
However, when I click the create button, it shows nothing.
panda source share