我试图通过 remoteFunction 传递 ag:datePicker 值。但它返回一个空值。有人知道如何解决这个问题吗?我的普惠制页面:
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<html>
<g:javascript library="jQuery"/>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="layout" content="main"/>
<title>Insert title here</title>
</head>
<body>
<form action="">
<table>
<tr>
<td>Select Category :</td>
<td><g:select name="category"
from="['Crop','Location','Pest and Disease']"
onchange="${remoteFunction(controller:'AG10_aggregationReport',
action:'view', update:'report',
params:'\'filter=\'+document.getElementById(\'req_date\').value' )};"/>
</td>
<td>Date :</td>
<td><g:datePicker name="req_date" id="req_date" value=""/></td>
<td><g:submitButton name="view" value="View"/></td>
</tr>
<tr>
<td></td>
</tr>
</table>
<div id="report"></div>
</form>
</body>
</html>