我有简单的代码:
<script type="text/javascript">
var dataFromBrowser;
var dataForStore = [];
var callServerOwnerId = {
callback:callbackFunction,
arg: dataFromBrowser
};
// call to DWR function - from Java
AssetScreener.getEntityOwnerIds(callServerOwnerId);
function callbackFunction(dataFromServer, arg1) {
// yes, I see what I need
alert(dataFromServer);
return dataForStore[0] = dataFromServer[0];
}
console.log(dataForStore);
问题是我需要从我的数据中检索数据callbackFunction
并将数据设置为dataForStore
?