<form action="/home/search" method="get" id="search_form">
<div class="searchBox png" id="searchBox">
<input type="text" id="searchTxt" class="searchTxt" name="shopName" value="@shopName">
<a
class="searchPic h-submitBtn png" id="h-submitBtn" onclick="document:search_form.submit();">
</a>
</div>
</form>
有以下几种写法:
1.
<a class="searchPic h-submitBtn png" id="h-submitBtn" onclick="document:search_form.submit();">提交</a>
2.
<a href="javascript:document:search_form.submit();">提交</a>
3.
<a class="searchPic h-submitBtn png" id="h-submitBtn" onclick="document.getElementById('search_form').submit();">提交</a>