日期:2014-05-19  浏览次数:20636 次

提交form 表单是否用超链 别的方法可以代替
比如:
<form id="form1" name="form1" method="post" action="/123.do">
<input type="text" name="name1" id="name1"/>
<input type="submit" value="提交"/>
</form>

换成以下方法怎么实现上面的提交功能
<input type="text" name="name1" id="name1"/>
<a href="#"><img src/button.gif" alt="" width="94" height="27" /></a>

 我现在提交按钮换成 图片了,怎么实现上面 form 功能?

------解决方案--------------------
<a href="#" onclick="document.form1.submit();return false;"><img src/button.gif" alt="" width="94" height="27" /></a>

如果没有表单form1,你需要使用ajax提交