input type File Alternative button using JQuery click function
I开发者_如何学Python was trying to make a custom file upload button using the JQuery click function as seen here.
onclick="$('input[name=thumbfile]').click()"
<input id="thumbfile" name="thumbfile" type="file" value="upload" class="input" onchange="this.form.submit();"/>
Works fine in Safari but not in Firefox.
Any ideas.
Marvellous
Firefox 3.6 doesn't support script clicking the file input element. Firefox 4 does allow it assuming that it's not blocked by its popup blocker; you'll be OK if you're just redirecting the click from another element.
精彩评论