我在提交和返回按钮上使用图像。
当我点击提交时,图像参数如b1.x=66
,b1.y =6
以及其他参数。
如何停止仅发送图像参数以从一个Jsp页面发送到另一个Jsp页面。
请还原。
代码
<html>
<body>
<form>
<table>
<tr>
<td colspan=2>
<i>
<b>Please verify the information entered , click Submit to make the payments otherwise click Back to modify details <br> <br> </b>
</i>
</font>
</td>
</tr>
<tr>
<td align=middle colSpan=2>
<input type="image" name="b1" src="/mpt/images/submit.gif" border=0 value="success">
<a href="javascript:history.go(-1)">
<img src="/mpt/images/backbutton.gif" border="0" alt="Click to Edit The Information You Entered ">
</a>
</td>
</tr>
</table>
</form>
</body>
</html>
答案 0 :(得分:4)
它<input type="image">
的默认行为会发送鼠标坐标,我不这么认为你可以阻止它。您可以忽略这些参数并照常访问其他参数。
如果您真的不想要这些参数,可以使用<input type="submit">
并使用样式将图像添加为背景图片。
<input type="submit" id="bi"
style="background-image: url("/mpt/images/submit.gif"); border: solid 0px #000000; width: 150px; height: 22px;" />
调整高度和宽度以适合图像。