Grails

qq_30902683 2015-10-21 02:05:00
我页面现在有一个搜索功能,但是要求是当你按城市搜索是,搜索内容必须展现在搜索页面下方,不能跳转至新页面显示,请问怎么写。。。改了半天依旧是会跳转至新页面显示的
代码如下def search={


if (request.method == 'POST') {
render(
Runner.findAllByCityLike(params.city))
}
}


<h1>Search for message</h1>
<g:if test="${flash.message }">
<div class="message">
${flash.message }
</div>
</g:if>
<g:form action="index" method="POST">
<div class="dialog">
<table>
<tr class='prop'>
<td valign="top" class="value">
<input type="text" maxlength="30" name="city"/>
</td>
</table>
</div>
<div class="buttons">
<input type="submit" value="Search" class="formbutton"/>
</div>
</g:form>
...全文
284 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,760

社区成员

发帖
与我相关
我的任务
社区描述
搜索引擎的服务器通过网络搜索软件或网络登录等方式,将Internet上大量网站的页面信息收集到本地,经过加工处理建立信息数据库和索引数据库。
社区管理员
  • 搜索引擎技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧