Css 如何使用按钮代替输入、样式输入?
我的表格:Css 如何使用按钮代替输入、样式输入?,css,forms,jsp,servlets,post,Css,Forms,Jsp,Servlets,Post,我的表格: <form method="POST" action="AController"> <div class="userInput"> <table class="userInput"> <tr> <td><input type="text" id="username" name="login"></td>
<form method="POST" action="AController">
<div class="userInput">
<table class="userInput">
<tr>
<td><input type="text" id="username" name="login"></td>
</tr>
<tr>
<td><input type="submit" id="submitRegInput" name="reg"
value="Submit"></td>
</tr>
</table>
</div>
</form>
但它不起作用。
我的控制者:
if (req.getParameter("reg") != null) {
//doSmthingHere
}
如何将输入更改为按钮:
<button type="submit" id="submitRegInput">
<img src="images/okBtn.png" height="40" width="40" />
</button>
所以它做的工作和输入提交按钮做的一样?或者,使用图像设置input type=submit按钮样式的方法是什么?jsp表单按钮而不是输入:
<button type="submit" id="submitRegInput" name="reg">
<img src="images/okBtn.png"/>
</button>
url路径必须介于引号之间,这将回答您的问题
<button type="submit" id="submitRegInput">
<img src="images/okBtn.png" height="40" width="40" />
</button>
<button type="submit" id="submitRegInput" name="reg">
<img src="images/okBtn.png"/>
</button>
#submitRegInput {
background: no-repeat url(../images/okBtn.png) 0 0;
border: none;
}