I am searching for a jQuery script that selects a file when the form is automatic submitted.
我正在寻找一个jQuery脚本,当表单自动提交时,它会选择一个文件。
1 个解决方案
#1
12
Try .change() event for the input file control. Something like
为输入文件控件尝试.change()事件。类似的
<form action="test.html" id="form1">
<input type="file" id="fil1" />
</form>
$(function(){
$("#fil1").change(function(){
$("#form1").submit();
});
});
#1
12
Try .change() event for the input file control. Something like
为输入文件控件尝试.change()事件。类似的
<form action="test.html" id="form1">
<input type="file" id="fil1" />
</form>
$(function(){
$("#fil1").change(function(){
$("#form1").submit();
});
});