javascript - Click action does not work against input file element on Chrome -


i input file element, , try click on in js on chrome console, not work , file upload dialog not appear. how can achieve this?
document.getelementbyid("input_file").click();

try onclick:

document.getelementbyid("input_file").onclick = function(){    //code action when clicked }; 

look here: http://jsfiddle.net/ghp2y/1/


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -