如何用锚发布

时间:2014-07-24 03:36:29

标签: html submit anchor

我想使用锚而不是按钮

Button可用作按钮或提交,但Anchor不用。

<form id="contact" action="includes/login.php" method="post" name="login_form">     
<input type="submit" value="Login" onclick="formhash(this.form, this.form.password);"/> 



<a href="includes/login.php" onclcik="return formhash(this.form, this.form.password);"><strong>Login</strong></a>

我确定它与传递/发布的参数有关,但不确定如何修复它。

1 个答案:

答案 0 :(得分:2)

试试这个:

<a onclick="document.getElementById('contact').submit();">click here</a>

这将发布表格的所有内容。