I found this fiddle: http://jsfiddle.net/QVAC7/ which help me to open the file input dialog. The idea is simple:
HTML:
<button id="id">Open</button>
<input id="yourinputname" type="file" name="yourinputname" style="display: none;" />
JS:
$('#id').on('click', function() {
$('#yourinputname').trigger('click');
});
The code works fine, when I click the button, a dialog showed up.
But there is a strange thing that when I enter the same command to the Chrome console, the dialog did not show up.
$('#yourinputname').trigger('click');

Is there any reason for this?