有人可以帮助改变这种纳入称为图像BUTTON1.JPG
代替标准的submit
按钮?
<form id='formName' name='formName' onsubmit='redirect();return false;'>
<div class="style7">
<input type='text' id='userInput' name='userInput' value=''>
<input type='submit' name='submit' value='Submit'>
</div>
</form>
使用的image
类型的输入:
<input type="image" src="/Button1.jpg" border="0" alt="Submit" />
完整的HTML:
<form id='formName' name='formName' onsubmit='redirect();return false;'> <div class="style7"> <input type='text' id='userInput' name='userInput' value=''> <input type="image" name="submit" src="https://jekyllcodex.org/uploads/grumpycat.jpg" border="0" alt="Submit" style="width: 50px;" /> </div> </form>
为什么不:
<button type="submit">
<img src="mybutton.jpg" />
</button>
使用CSS:
input[type=submit] {
background:url("BUTTON1.jpg");
}
对于HTML:
<input type="submit" value="Login" style="background:url("BUTTON1.jpg");">
<form id='formName' name='formName' onsubmit='redirect();return false;'>
<div class="style7">
<input type='text' id='userInput' name='userInput' value=''>
<img src="BUTTON1.JPG" onclick="document.forms['formName'].submit();">
</div>
</form>
HTML:
<button type="submit" name="submit" class="button">
<img src="images/free.png" />
</button>
CSS:
.button { }