图片实现 提交/重置 按钮
圖片實現 提交/重置 按鈕
提交:
第一種方式(無圖片的): <input? type="submit" value="提交" />
第二種方式(有圖片的): <input type="image" src="image/login.jpg" />
第三種方式(有圖片的),通過鏈接的方式:?
??? <form name="form1" action="login">
??????? <input type="text" name="usename"/><br/>
??????? <input type="password" name="password" /><br/><br/> ?????
???????
??????? <!-- 提交 -->
??????? <a href= "javascript:document.form1.submit(); " >??
?????????? <img src= "image/login.jpg " border="0">
??????? </a>
?????? ?
??? </form>
重置:
第一種方式(無圖片的): <input? type="reset" value="重置" />
第二種方式(有圖片的):
??? <form name="form1" action="login">
??????? <input type="text" name="usename"/><br/>
??????? <input type="password" name="password" /><br/><br/>
???????
??????? <input type="image" src="image/login.jpg" />? <!-- 提交 -->
???????
???????<!-- 重置 -->
??????? <a href= "javascript:document.form1.reset(); " >??
?????????? <img src= "image/reset.jpg " border="0">
??????? </a>
?????? ?
??? </form>
超鏈接的方式調用javascript函數:
functionTest() 是函數的名字,當然還可以攜帶參數
<a href= "javascript:functionTest(); " >單擊</a>
圖片提交方式
<form name="findForm" action="<%=request.getContextPath()%>/FindBookInfoByIndexServlet?nowPage=1" method="post"> 書名:<input type="text" size=10 name="bookName"><br> 作者:<input type="text" size=10 name="author"><br><br> ????<img src="images/changxiao09.gif" οnclick="findForm.submit()" width="45" height="18" alt="搜索"> <img src="images/reset.png" οnclick="findForm.reset()" width="45" height="18" alt="重置"><br> </form>
<img src="images/changxiao09.gif"? οnclick="findForm.submit()" width="45" height="18" alt="搜索">
<img src="images/reset.png"? οnclick="findForm.reset()" width="45" height="18" alt="重置">
findForm 是Form標簽的名字
總結
以上是生活随笔為你收集整理的图片实现 提交/重置 按钮的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jdk自带的Unicode转utf8工具
- 下一篇: Cisco路由器安全配置命令