form中把图片设为按钮

提交按钮sumbit

<input type="image" src="图片路径">//type="image"默认是sumbit,不用再添加onclick事件提交,否则会发生表单被提交两次的情况

重置按钮reset

<input type="image" src="../img/sumbit_btn.jpg" onclick="document.bd.reset()">//bd代表form标签中name属性的值

  

猜你喜欢

转载自www.cnblogs.com/duyadong/p/12117046.html