61,112
社区成员
发帖
与我相关
我的任务
分享
<form id="searchForm" method="get" action="search.asp" target="_blank" style="margin:0px;"> <DIV class="input"><INPUT name="key" maxLength="100" type="text" placeholder="关键词"> <DIV class="icon-search" onclick="handon();"> SEARCH</DIV></DIV>
</form>
<script> function handon(){
document.querySelector("#searchForm").submit(); //alert(1)
} </script>
<DIV class="input">
<INPUT name="key" maxLength="100" type="text" placeholder="关键词">
<DIV class="icon-search"></DIV>
</DIV>
</DIV>
你这里多了一个“</DIV>“,
再不行把<DIV class="icon-search"></DIV>换成<button class="icon-search"type="submit"></button>