开发者

Jquery automatic submit - form type file

I am searching for a jQuery script 开发者_如何学运维that selects a file when the form is automatic submitted.


Try .change() event for the input file control. Something like

<form action="test.html" id="form1">
    <input type="file" id="fil1" />
</form>

$(function(){
    $("#fil1").change(function(){
        $("#form1").submit();
    });
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜