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

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -