【发布时间】:2011-05-12 10:38:04
【问题描述】:
虽然 Grails 有多个标签来生成资源链接或锚标签,但普通的 href 呢?假设我自己编写了一些 AJAX 函数,我想说类似
$.post("<g:href controller='mycontroller' action='update' />');
【问题讨论】:
标签: grails tags hyperlink href
虽然 Grails 有多个标签来生成资源链接或锚标签,但普通的 href 呢?假设我自己编写了一些 AJAX 函数,我想说类似
$.post("<g:href controller='mycontroller' action='update' />');
【问题讨论】:
标签: grails tags hyperlink href
我认为createLink 是您正在寻找的:
<a href="${createLink(controller:'mycontroller', action:'update')}" />
【讨论】: