表单提交按钮图片形式的几种写法

表单
<form name=”form1″ action=”arrive.php”>
1.单独图片代替按钮
<input type=”image” name=”submit” value=”提交”>
2.鼠标经过时图片的两种变换状态(貌似不好用)
<image src=”images/a.gif”  onmouseover=”this.src=\’images/b.gif\'” onmouseout=”this.src=\’images/a.gif\'”/>
3.
<script type=\’javascript\’>
var ding_1 = new Image();
var ding_2 = new Image();
ding_1.src = “images/mouseout_queding.gif”
ding_2.src = “images/mouseover_queding.gif”

var ding_3 = new Image();
var ding_4 = new Image();
ding_3.src = “images/mouseout_fanhui.gif”
ding_4.src = “images/mouseover_fanhui.gif”
</script>

<a href=”index.php”  onmouseover=”dingdan.src=ding_1.src”  onmouseout=”dingdan.src=ding_2.src”  onclick=”form1.submit()”><img src=”images.mouseout_queding.gif”></a>

注:a href的表单提交用javascript的form1.submit实现,action别漏了。
</form>

版权声明:本文为ovliverlin原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/ovliverlin/archive/2008/03/24/1120198.html