dwr开发流程(三)
六、在JavaScript中调用,创建一个 WebContent/test1.html
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <script type="text/javascript" src='dwr/util.js'></script> <script type="text/javascript" src='dwr/engine.js'></script> <script type="text/javascript" src='dwr/Service123.js'></script> <!-- engine.js 和 util.js 是 dwr 自带的脚本文件。--> <!-- testService123.js 是 dwr 根据配置文件自动生成的, --> <script type="text/javascript"> // 调用java对象的函数 function doDwr(){ Service123.sayHello("Jorwen",callBackHello); } // 处理返回值的回掉函数 function callBackHello(data){ alert(data); } </script> </head> <body> <input type="button" name="button1" value="测试" onclick="doDwr()"/> </body> </html>
上一页:dwr开发流程(二)
相关推荐
Eric实验室 2014-01-25
dengcanjun 2015-07-05
logocvv 2013-11-18
tansybigrabbit 2012-03-01
MayMatrix 2009-01-21
Drxin 2016-01-28
huangxb00 2015-10-27
mannoroth 2011-03-30
huanglianhuabj00 2014-12-25
del 2011-03-18
tomatoboryj 2011-03-14
MusicPeng 2014-11-20
mannoroth 2011-01-06
mofgeng 2010-12-19
del 2014-01-25
del 2010-09-01
lisongchuang 2013-07-16