PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

PHP模糊查询把搜索的关键词传递到url上的原理是怎样的?

原创
2016-07-06 13:52:04 866浏览

<code><form method="post" action="<%7Burl%20c='main'%20a='search'%7D>">
    <input type="text" name="kw" class="search_text fl" placeholder=""><input type="submit" class="search_btn fr" value="搜 索"></form></code>

现在模糊查询后是这样localhost/main/search.html
想要实现这种效果localhost/main/search.html?kw="关键词"
kw这个值传到url的原理是怎样的

回复内容:

<code><form method="post" action="<%7Burl%20c='main'%20a='search'%7D>">
    <input type="text" name="kw" class="search_text fl" placeholder=""><input type="submit" class="search_btn fr" value="搜 索"></form></code>

现在模糊查询后是这样localhost/main/search.html
想要实现这种效果localhost/main/search.html?kw="关键词"
kw这个值传到url的原理是怎样的

你把表单方法改成get,就有你要的效果了

声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn核实处理。