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

Java sticky instances of class com.mysql.jdbc.Field aggregating -