我想在不使用提交的情况下使用搜索栏


I want to use search bar without using submit

当我键入搜索查询时,我会得到以下url

http://localhost/bp/contactus.php?search=bvlfnfdl&submit=Submit

而我想要它作为

http://localhost/bp/contactus.php?search=bvlfnfdl

如何帮助

删除提交按钮上的"name"。

<form action="search.php" method="get">
   <input type="text" name="search" />
   <input type="submit" value="search" />
</form>

然后在PHP中,您只需访问$_GET['search']即可获取搜索到的数据。

相关文章: