gpt4 book ai didi

jquery 倒计时 - 到期后自动提交表单?

转载 作者:行者123 更新时间:2023-12-01 06:02:19 29 4
gpt4 key购买 nike

我正在使用 jquery_countdown (http://keith-wood.name/countdown.html) 设置 60 分钟计时器。我知道我可以在时间到期时运行回调函数,但是有没有办法自动提交表单?

我尝试了以下操作,但提交失败(尽管firebug控制台中没有错误):

<div class="countdown"></div>
<form id="formsamp" action="#">
<textarea name="bft"></textarea>
<input type="submit" name="op" value="Submit" />
</form>

jquery_countdown_add
(
".countdown",
array
(
"until" => 10,
"onExpiry" => "finished"
)
);

function finished() {
$('#formsamp').submit(function(){return true;});
}

最佳答案

尝试以下操作:

$('#formsamp').submit();

$('input[type=submit][name=op]').trigger('click');

关于jquery 倒计时 - 到期后自动提交表单?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10079306/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com