如何自动提交表单 [英] How do I automatically submit a form

查看:823
本文介绍了如何自动提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家早上好,我需要一些HTML专家的帮助



首先,我的英语不好(法语口语)

秒,我是计划中的新手/坏人(不是我的域名)。



需要帮助来自动化现有(本地)网页连接。



到目前为止,我已经能够自动输入用户名和密码到表单,但我不知道如何自动提交表单whitout点击按钮。



我知道这不是安全的做事方式,但它是一个本地页面,在一个售货亭,没有用于显示日历的输入设备。



任何人都可以帮助我,示例代码如下?



感谢



Redge < br $>


Good morning everyone, I need the help of some html specialist

first , my english is bad (french spoken)
second, I'm a newbie/bad in programmation (not my domain).

Need help to automate a existing (local) webpage connection.

So far I been able to enter automaticaly the username and needed password to the form , but I dont know how to automatically submit the form whitout click on the button.

I know this is not the secure way of doing thing , but its a local page , on a kiosk, no input device for displaying a calendar.

can anyone can help me, sample code bellow ?

Thank

Redge

<h2>Login</h2><div id="boxlogin" class="loginbox">
<h4 style="color:red"></h4>

<form action="http://some-local-website/sessions/authenticate" method="POST" accept-charset="utf-8">
<dl>
<dt><label for="login">Login</label></dt>
<dd><input type="text" name="user[login]" value="username-exemple" />
</dd>

<dt><label for="password">Password</label></dt>
<dd><input type="password" name="user[password]" value="fake-password" />
</dd>

</dl>
<ul>
<li><input type="submit" name="submit" value="Login" />
 <input type="submit" name="logout" value="Cancel" />
</li>
</ul>

</form></div> 





我的尝试:



试图找到一种方法来自动提交



What I have tried:

tried to find a way to auto submit

推荐答案

我解决了我的问题



i fix my issue

<script type="text/javascript">
	document.getElementById("id").click();
</script>


这篇关于如何自动提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆