DWR框架的使用说明
时间:2026-01-14
时间:2026-01-14
DWR框架的使用说明
2、调用有简单返回值的java方法
2.1、dwr.xml的配置
配置同1.1
<dwr>
<allow> <create creator="new" javascript="testClass" > <include method="testMethod2"/> </create> </allow>
</dwr>
2.2、javascript中调用
Function callTestMethod2(){
}
Function callBackFortestMethod2(data){
} alert("the return value is " + data); testClass.testMethod2(callBackFortestMethod2);