大家好:
今天在修改项目的时候遇到了个问题,就是点击按钮使用form表单提交信息!
<span style="font-size:14px;"><form name="searchForm" id="searchForm" method="post" action="${ctx}/heInfo/getHeInfoList" > <h2 class="page_headline"><span class="c_blue store_title">名称列表</span></h2> <ol class="list_search_wrap"> <li class="list_search"> 名称: <input type="text" id="name" name="name" class="inp_2" /> <input type="button" onclick="toSearchHosp();" value="搜 索" class="btn_search" /> </li> </ol> </form></span>
<span style="font-size:14px;">function toSearchHosp(){ $("#pageIndex").val(1); <span style="color:#FF9966;"><strong>submitForm('searchForm');</strong></span> } <strong><span style="color:#FF9966;">function submitForm(formName){ document[formName].submit(); }</span></strong></span>
原文地址:http://blog.csdn.net/yingmengxuepingbao/article/details/44035613