本文摘自PHP中文网,作者php中世界最好的语言,侵删。
这次给大家带来怎样用image来提交form,用image来提交form的注意事项有哪些,下面就是实战案例,一起来看一下。代码如下:
1 2 3 4 5 | <form method= "post" action= "formtest.html" target= "_blank" name= "formtest" >
<input type= "hidden" name= "userid" value= "userid" >
<input type= "hidden" name= "username" value= "username" >
<input type= "image" src= "imagesubmit.gif" border= "0" >
</form>
|
不想使用button提交form,想用好看点的image来提交
那样写就会提交两次了,input本身提交一次,js脚本再提交一次
使用图片做为提交按纽有如下几种方法:
1.
1 2 3 4 5 | <form method= "post" action= "formtest.jsp" >
<input type= "hidden" name= "userid" value= "userid" >
<input type= "hidden" name= "username" value= "username" >
<input type= "image" src= "imagesubmit.gif" border= "0" >
</form>
|
就如楼主自已所写的,这样是完全可以的
2.
阅读剩余部分
相关阅读 >>
jquery validation的使用详解
html5 form新增的属性
html form标签与table标签的区别是什么?这里有说明!
html的form标签用法
tp5如何引入css文件
html中form与表单提交操作的方法总结
关于select等form表单元素使用介绍
html中的form标签的method属性怎么用?这里有method属性的用法介绍
html表单边框怎么加颜色?html form标签的边框颜色实例
html form标签的action属性是什么意思?又有哪些用法?(附实例)
更多相关阅读请进入《Image》频道 >>
人民邮电出版社
本书对 Vue.js 3 技术细节的分析非常可靠,对于需要深入理解 Vue.js 3 的用户会有很大的帮助。——尤雨溪,Vue.js作者
转载请注明出处:木庄网络博客 » 怎样用image来提交form