开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜