我如何使用< a href =" ...">提交POST表单标签? [英] How can I submit a POST form using the <a href="..."> tag?
本文介绍了我如何使用< a href =" ...">提交POST表单标签?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用< a href =...>
How can I submit a POST form to showMessage.jsp
using just the <a href="...">
tag?
<form action="showMessage.jsp" method="post">
<a href="showMessage.jsp"><%=n%></a>
<input type="hidden" name="mess" value=<%=n%>/>
</form>
推荐答案
如果您使用按钮,则不需要JavaScript: / p>
No JavaScript needed if you use a button instead:
<form action="your_url" method="post">
<button type="submit" name="your_name" value="your_value" class="btn-link">Go</button>
</form>
You can style a button to look like a link, for example:
.btn-link{
border:none;
outline:none;
background:none;
cursor:pointer;
color:#0000EE;
padding:0;
text-decoration:underline;
font-family:inherit;
font-size:inherit;
}
这篇关于我如何使用< a href =" ...">提交POST表单标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文