[英]Submit a Form without Clicking Submit
I need my form to automatically hit "select" after the user has a few seconds to verify the data that is presented. 用户需要几秒钟的时间来验证显示的数据后,我需要我的表单自动单击“选择”。 The easiest way I can think to do this would be have Javascript select the submit option after a matter of seconds however most of the replies I've seen using JavaScript are just refreshing the page... is it possible to have Javascript actually select the "submit" button after a number of seconds?
我能想到的最简单方法是让Javascript在几秒钟后选择Submit选项,但是我使用JavaScript看到的大多数回复都只是刷新页面...是否有可能让Javascript实际上选择了几秒钟后“提交”按钮? Here is my code:
这是我的代码:
<div class="clear"></div>
<hr>
<p class="full-width">
<span class="buttons pull-left">
<input type="button" name="cancel" class="close" value="<?php
echo __('Cancel'); ?>">
</span>
<span class="buttons pull-right">
<input type="submit" value="<?php echo __('Continue'); ?>">
</span>
</p>
</form>
</div>
It is possible to do a submit after a set time interval using setTimeout
可以在设置的时间间隔后使用
setTimeout
进行提交
Here is a working fiddle http://jsfiddle.net/a37240dz/ 这是一个工作的小提琴http://jsfiddle.net/a37240dz/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.