我如何提交 POST 表单至showMessage.jsp
仅使用<a href="...">
tag?
<form action="showMessage.jsp" method="post">
<a href="showMessage.jsp"><%=n%></a>
<input type="hidden" name="mess" value=<%=n%>/>
</form>
如果您使用按钮,则不需要 JavaScript:
<form action="your_url" method="post">
<button type="submit" name="your_name" value="your_value" class="btn-link">Go</button>
</form>
You can 将按钮设置为看起来像链接, 例如:
.btn-link {
border: none;
outline: none;
background: none;
cursor: pointer;
color: #0000EE;
padding: 0;
text-decoration: underline;
font-family: inherit;
font-size: inherit;
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)