开发者

Jquery automatic submit - form type file

开发者 https://www.devze.com 2023-02-05 02:55 出处:网络
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

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

精彩评论

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