gpt4 book ai didi

javascript - 将 Javascript 变量传递给 grails RemoteFunction

转载 作者:搜寻专家 更新时间:2023-11-01 04:10:41 30 4
gpt4 key购买 nike

<分区>

Possible Duplicate:
pass parameter in g:remoteLink as result of javascript function

我正在尝试调用由按钮的 onclick 触发的 remoteFunction 调用,但单击不会调用该函数。我已经用警报启动测试了 onlick 命令并调用了该函数。这是我的代码。

<input type="button" onclick="exportList()" value= "Export"/>

function exportList(){

var profile= document.getElementById('dropdown').value
${remoteFunction(controller: 'profile' , action:'export', params: "'profile=' + profile")}


}

当我取出参数和 var 配置文件时,该函数仍未被调用...我的 Controller 和操作已正确命名,所以我不知道为什么会出现此错误。如果您能提供帮助,请提前致谢!

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com