刚使用DWR出现问题,DWR engine before including this file
'You must include DWR engine before including this file'
js代码:
if (typeof dwr == 'undefined' || dwr.engine == undefined) throw new Error('You must include DWR engine before including this file');
原因是:
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/interface/test.js"></
script
>
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/engine.js"></
script
>
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/util.js"></
script
>
这个顺序在DWR3.0已经不是这样了,2.0前就可以正常使用。
所以,
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/engine.js"></
script
>
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/util.js"></
script
>
<
script
type
=
"text/javascript"
src="<%=path%>/dwr/interface/test.js"></
script
>
这样的顺序才能正常使用。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。