<td><g:field type="number" name="deadlineFT" value="${selectedMilestone.deadlineFT}"
onchange="${remoteFunction(action: 'updateMilestone', params: [id: selectedMilestoneID, item:'deadlineFT', value: this.value])}"/> Months</td>
selectedMilestoneID
是一个groovy
变量。上面的代码无效,因为groovy无法识别this.value
。但是,如果我使用params: '\'value\'+this.value
,则无法获得selectedMilestoneID
。
有没有办法获得这两个值?
答案 0 :(得分:0)
试试这个:
<g:field type="number" name="deadlineFT" value="${selectedMilestone.deadlineFT}"
onchange="${remoteFunction(action: 'updateMilestone',
params: "'id=${selectedMilestoneID}&value='+this.value")}"/>