轉自:http://www.iteye.com/topic/371958
jsp:
<script type='text/javascript'>
function hello() {
var user = $('user').value;
alert(user);
Hello.hello(user, callback);
}
function callback(msg) {
alert(msg);
DWRUtil.setValue('result', msg);
}
</script>
下載下傳的dwr3,一直提示DWRUtil未定義,添加xalan.jar也不好使
解決辦法:在DWRUtil.setValue('result', msg);前加入
if (typeof window['DWRUtil'] == 'undefined')
window.DWRUtil = dwr.util;
(發現别人早已解決)