這篇文章主要介紹了通過a標(biāo)簽的超鏈接提交form表單方法匯總,十分的全面細(xì)致,也很實(shí)用,有需要的小伙伴可以參考下。
廢話就不多說了,直接上內(nèi)容。
?
1 2 3 4 5 6 7 8 <form action="/home/search" method="get" id="search_form"> <div class="searchBox png" id="sear有以下幾種寫法:
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>
以上就是給大家匯總的幾種方法了,希望對大家學(xué)習(xí)js能夠有所幫助。
新聞熱點(diǎn)
疑難解答
圖片精選