??xml version="1.0" encoding="utf-8" standalone="yes"?>中出在线观看,成人一区二区在线,99香蕉久久http://www.aygfsteel.com/pdw2009/category/13411.htmlJ2EE相关应用技术日?/description>zh-cnFri, 07 Mar 2008 13:45:53 GMTFri, 07 Mar 2008 13:45:53 GMT60dwr+springhttp://www.aygfsteel.com/pdw2009/archive/2008/03/07/184454.html有猫怼的日?/dc:creator>有猫怼的日?/author>Fri, 07 Mar 2008 03:40:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2008/03/07/184454.htmlhttp://www.aygfsteel.com/pdw2009/comments/184454.htmlhttp://www.aygfsteel.com/pdw2009/archive/2008/03/07/184454.html#Feedback0http://www.aygfsteel.com/pdw2009/comments/commentRss/184454.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/184454.html唯一不同的就是dwr.xml文g中的配置不同.参与如下例子

<?xml version="1.0" encoding="UTF-8"?>   
<!DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN" 
    "http://www.getahead.ltd.uk/dwr/dwr10.dtd"
> 
<dwr>
    
<allow>
        
<create creator="spring" javascript="GISInterfaceService">
            
<param name="beanName" value="gisInterfaceService"/>
        
</create>
        
</allow>
</dwr>


]]>
dwr实例http://www.aygfsteel.com/pdw2009/archive/2007/10/19/154218.html有猫怼的日?/dc:creator>有猫怼的日?/author>Fri, 19 Oct 2007 07:10:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2007/10/19/154218.htmlhttp://www.aygfsteel.com/pdw2009/comments/154218.htmlhttp://www.aygfsteel.com/pdw2009/archive/2007/10/19/154218.html#Feedback0http://www.aygfsteel.com/pdw2009/comments/commentRss/154218.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/154218.html阅读全文

]]>
DWR学习(fn)摘要http://www.aygfsteel.com/pdw2009/archive/2007/07/26/132565.html有猫怼的日?/dc:creator>有猫怼的日?/author>Thu, 26 Jul 2007 08:01:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2007/07/26/132565.htmlhttp://www.aygfsteel.com/pdw2009/comments/132565.htmlhttp://www.aygfsteel.com/pdw2009/archive/2007/07/26/132565.html#Feedback1http://www.aygfsteel.com/pdw2009/comments/commentRss/132565.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/132565.htmlDWR的用经?   

   1.. 需要jdom.jar和bsf.jar,否则无法跟spring整合.

      2.. dwr生成的javascript函数?x)自动加一个回调函数的参数,如原来的函数是checkExist(String name),那么生成的javascript函数是checkExist(callbackFunc,String name).

      3.. 注意回调函数只能有一个参?是服务器的q回?如function(messFromServer),q里messFromServer是该操作在服务器上的q回?

      4.. util.js里面有很多有用的Ҏ(gu),最好熟(zhn)一?

      5.. convertq不是必ȝ,只有你的函数需要传递非基本数据cd的数据时需要此?
      我需要增强的,dom操作,javascript

 

DWR collection converter 使用摘要

<convert converter="collection" match="java.util.Collection"/>但是不知道怎么用,?Java Object Q-> Javascript Object 问题不大Q有现成的例子可供参?Q)(j)Q就?Java function q回一个CollectionQ看了一下返回值在 javascript 中是的Ş式是一个object Array然后?javascript 取出每一?Object?property (eg. object.id , objecct.name....)
下面是一个应用实例-Q-Q-Q-Q-Q-Q-Q-Q-Q-Q-DWR.XML------------------------------

<dwr>   
<allow>      
  <convert converter="bean" match="dwr.sample.Apartment"/>      
  <create creator="new" javascript="ApartmentDAO" class="dwr.sample.ApartmentDAO">           
 <include method="findApartments"/>           
 <include method="countApartments"/>           
 <include method="addApartment"/>           
<include method="addApartments"/>           
<include method="addApartments2"/>       
</create>       
<create creator="spring"   javascript="ApartmentDAO"  >       
</create> 
 </allow>   
<signatures>    
<![CDATA[import java.util.*;    
import dwr.sample.*;   
  ApartmentDAO.addApartments(List<Apartment>);    
ApartmentDAO.addApartments2(Map<String,Apartment>); 
 ]]>   
  </signatures>
</dwr>
如果传如 java 的代码的参数 是一?Collection Q则要稍微处理以下,先照上面 黑体?的声明以下传入的Collection的内部包含的cȝ 切cdQ以?Java 代码 作出判断Q如果传入的参数是一?ListQ则?Javascript 中把q些对象攑֜ 一个Array中就可以了,如果传入的参数是一个MapQ原来以为是一?二维?Arrayp了,但是试过之后发现不行Q看了一下例子,原来要用这UŞ式:(x)  var depts={ "dept1":new department("2", "200"),"dept2":new department("3", "300") };q样传进M?Java ׃(x)Ҏ(gu) q些 数据构徏 一个MapQ?

 



]]>
dwr2与struts2整合http://www.aygfsteel.com/pdw2009/archive/2007/07/23/131857.html有猫怼的日?/dc:creator>有猫怼的日?/author>Mon, 23 Jul 2007 05:20:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2007/07/23/131857.htmlhttp://www.aygfsteel.com/pdw2009/comments/131857.htmlhttp://www.aygfsteel.com/pdw2009/archive/2007/07/23/131857.html#Feedback1http://www.aygfsteel.com/pdw2009/comments/commentRss/131857.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/131857.html

转自?http://swimren.javaeye.com/blog/98186

关键? DWR       

最q发现dwrZ2.0版本Q里面提供了与目前一些主框架的整合Q如Spring,JSF,Hibernate,Struts1,Webwork{,但Struts2.0q没有提供,׃现在的项目我们采用的是Struts2.0Q所以参考dwr与webwork的整合代码,修改完成?br>dwr与Struts2的整和代?/font>

1、首先下载Dwr2的源代码Q将 org\directwebremoting\webwork下的cL出来Q放?新徏的一个包
   比如 org.dwr.struts2 里,接下d可以M攚w面的代码Q?br>    类的引用都修改Zstruts2的包中引用?br>2、接下去关键是修?DWRAction.javaq个c?br>   在该cM 比较Ҏ(gu)的是
   com.opensymphony.webwork.dispatcher.DispatcherUtils
对应的struts2中的  org.apache.struts2.dispatcher.Dispatcherq个c?br>  ServletActionContext.WEBWORK_VALUESTACK_KEY  对应 ServletActionContext.STRUTS_VALUESTACK_KEY

3、修攚w面的 private DWRAction(ServletContext servletContext) 构造函Cؓ(f)

java 代码
  1. private DWRAction(ServletContext servletContext) throws ServletException   
  2.     {   
  3.        // Dispatcher.initialize(servletContext);   
  4.         m_wwDispatcher = Dispatcher.getInstance();   
  5.         if(m_wwDispatcher==null)   
  6.         {   
  7.            m_wwDispatcher = new Dispatcher(servletContext, new HashMap());   
  8.            m_wwDispatcher.init();   
  9.            Dispatcher.setInstance(m_wwDispatcher);   
  10.         }   
  11.            
  12.         m_actionProcessor = loadActionProcessor(servletContext.getInitParameter         (DWRACTIONPROCESSOR_INIT_PARAM));   
  13.     }   

然后修改protected ActionInvocation invokeAction Ҏ(gu) 第126行的代码

java 代码
  1. ActionProxy proxy = ActionProxyFactory.getFactory().createActionProxy(actionDefinition.getNamespace(), actionDefinition.getAction(), extraContext, actionDefinition.isExecuteResult(), false);   

替换Z下代?/font>

java 代码

 

  1. Configuration config = du.getConfigurationManager().getConfiguration();   
  2.             ActionProxy proxy = config.getContainer().getInstance(ActionProxyFactory.class).createActionProxy(   
  3.                     mapping.getNamespace(), mapping.getName(), extraContext, actionDefinition.isExecuteResult(), false);   

最后将 protected void prepareContinuationAction(HttpServletRequest request, Map extraContext)
 里的代码都注释掉 可以了

4Q修?DWRActionUtil.js文g里面的webwork字样都替换ؓ(f) struts2,也可以不用修改,不过觉得不爽是?br>  然后可以按照与webwork整和的方式配|dwr.xml可以了

 

最后有一点很重要,是?web.xml文g中配|DwrServlet 的时候一定要加上 
     exposeInternals
     true
      

q个参数,否则生成?DWRAction.js q个文g不存在 DWRAction.execute(actionObj, params, callbackObj) q个函数,q个问题折磨了我q半天的旉?

如果需要可以提供代码上?不过最好还是徏议大家亲自去修改一下比较好.


最后更斎ͼ(x)2007-07-07 11:10
17:17  |   怹链接  |   览 (994)  |   评论 (5)  |    收藏  |   AJAX  |   q入论坛  |  
评论    ?5 ? 发表评论
totodo     2007-07-05 20:35

其实 QServlet那层Q可以扔掉了?/p>

不要在再Web层还?XX+XX?/p>

swimren     2007-07-06 08:23

?采用dwr,可以直接去访问业务层,不用采用Struts 之类?但有些时候还需要控制层,在个别的地方的用dwr去调?两种l合着比较好?

movingboy     2007-07-07 00:06

hgQ?/p>

1.我现在在试用AppFuse 2.0-M5Q我试了它自带的DWR 2.0.1和Struts 2.0.6Q在客户端能够正地调用Struts action的方法ƈq回数据。我看了DWRAction.java的代码,实是象你提到的改动前的样子Q但我没做Q何改动。我想问一下你改动q个cȝ目的是什么呢Q不改动?x)有什么问题呢Q?/p>

2.你在文中提到Q?/p>

引用
最后有一点很重要,是?web.xml文g中配|DwrServlet 的时候一定要加上
exposeInternals
true

 

我的web.xml没有讄q一V如果没有生成DWRAction.execute(actionObj, params, callbackObj) Q会(x)有什么问题呢Q?/p>

附上我的例子作ؓ(f)分析参考:(x)
dwr.xml的配|:(x)

代码
  1. <!DOCTYPE dwr PUBLIC   
  2.     "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN"   
  3.     "http://getahead.ltd.uk/dwr/dwr20.dtd">  
  4. <dwr>  
  5.     <allow>  
  6.         <create creator="spring" javascript="inquiryMasterAction">  
  7.             <param name="class" value="cn.net.cogent.summer.webapp.action.InquiryMasterAction"/>  
  8.             <param name="beanName" value="inquiryMasterAction"/>  
  9.             <include method="getDetailsByMasterId"/>  
  10.         </create>  
  11.         <convert converter="bean" match="cn.net.cogent.summer.model.InquiryDetail"/>  
  12.     </allow>  
  13. </dwr>  

 

其中InquiryMasterAction的getDetailsByMasterIdҎ(gu)的Java代码为:(x)

代码
  1. public List<InquiryDetail> getDetailsByMasterId(Long masterId);  

 

生成的inquiryMasterAction.js的内容:(x)

代码
  1. // Provide a default path to dwr.engine   
  2. if (dwr == null) var dwr = {};   
  3. if (dwr.engine == null) dwr.engine = {};   
  4. if (DWREngine == null) var DWREngine = dwr.engine;   
  5.   
  6. if (inquiryMasterAction == null) var inquiryMasterAction = {};   
  7. inquiryMasterAction._path = '/dwr';   
  8. inquiryMasterAction.getDetailsByMasterId = function(p0, callback) {   
  9.   dwr.engine._execute(inquiryMasterAction._path, 'inquiryMasterAction', 'getDetailsByMasterId', p0, callback);   
  10. }   

 

在JSP面中只需要调用:(x)

代码
  1. <script type='text/javascript'>  
  2.   var masterId = 1;   
  3.   var result;   
  4.   inquiryMasterAction.getDetailsByMasterId(1, result);   
  5. </script>  

 

swimren     2007-07-07 10:57

to movingboy :

我没有具体的ȝI?AppFuse 2.0-M5的源码,不过从你的描qC可以看出来,你的q种配置方式也是可以正常工作的?
首先你是 把InquiryMasterAction 看作一个独立的cL处理的,也就是说针对 InquiryMasterAction 单独生成了一?strong>inquiryMasterAction.js文gQ而方法getDetailsByMasterId q回的是你实际需要的数据。然后再通过
inquiryMasterAction.getDetailsByMasterId(1, result); 去调用的Q这U方式是DWR最初的最单方式。你的例子里实际上是没有用到 DWRAction.jsq个文g?strong>DWRAction.javaq个cM?
但是在Struts2中,Action 中的Ҏ(gu)是需要具体的q回一个Stringcd?result,也就是定位到具体的页面或路径上。而需要的数据都被攑ֈ ValueStack中了。所以数据的取法׃一样了?
上面说的dwr2与strut2的整和,主要是ؓ(f)了不需要调整原来的Action的写法。所有的Action 的调用都可以通过

代码
  1. DWRActionUtil.execute({   
  2.   namespace:'/yournamespace',   
  3.   action:'yourAction',   
  4.   method:'yourMethod',   
  5.   executeResult:'true'   
  6. }, 'data', callBack);     

q种方式去调用就可以?q个Ҏ(gu)最l会(x)去调?DWRAction.js里的execute()Ҏ(gu)。这U方式是保留了Action的原汁原呻I按照Struts2的机制去处理的?
具体的你可以参考一?dwr2的文档中 与webwork整和的部分或着参考下面的
http://wiki.javascud.org/display/dwrcn/WebWork+Integration?focusedCommentId=917506
也可?/td>


]]>
DWR调用http servlethttp://www.aygfsteel.com/pdw2009/archive/2006/11/21/82628.html有猫怼的日?/dc:creator>有猫怼的日?/author>Tue, 21 Nov 2006 15:01:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2006/11/21/82628.htmlhttp://www.aygfsteel.com/pdw2009/comments/82628.htmlhttp://www.aygfsteel.com/pdw2009/archive/2006/11/21/82628.html#Feedback0http://www.aygfsteel.com/pdw2009/comments/commentRss/82628.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/82628.html 我们在实际的 web 应用开发过E中Q在用户d后会(x)?/span> session 中塞入一些信息(例如用户信息Q菜单信息等Q,在页面提交后Q会(x)?/span> session 中取些信息,拼成完整的业务记录,保存到数据库中。此时就要求 DWR 可以?/span> Servlet 对象通信?/span>

其实 DWR 已经考虑好了Q在 DWR1.1 中可以利?/span> uk.ltd.getahead.dwr.WebContext ?/span> uk.ltd.getahead.dwr.WebContextFactory 来和 Http Servlet 的标准对象进行通信Q包括:(x)

l         HttpServletRequest

l         HttpServletResponse

l         HttpSession

l         ServletContext

l         ServletConfig 

 具体调用的方法如下:(x)

import  javax.servlet.http.HttpServletRequest; 

import  uk.ltd.getahead.dwr.WebContext; 

import  uk.ltd.getahead.dwr.WebContextFactory;
 import org.directwebremoting.WebContextFactory; //DWR2.0Ҏ(gu)q样

//

WebContext ctx 
=  WebContextFactory.get(); 

HttpServletRequest req 
=  ctx.getHttpServletRequest(); 
     WebContext 是?/span>ThreadLocal保存的,你可以看一?/span>uk.ltd.getahead.dwr.impl.DefaultWebContextBuilder源码Q所以可以在M地方使用它,例如在上一的demo中进行测试如下:(x)
面里给session讄?br />
<%@ page contentType="text/html; charset=GBK" %> 

  

<% 

System.out.println(
"This is DWR servlet object!"); 

  

session.setAttribute(
"dwr","love dwr"); 

%> 
DWR要调用的cL?br />
package test.dwr; 

  

import javax.servlet.http.HttpServletRequest; 

  

import uk.ltd.getahead.dwr.WebContext; 

import uk.ltd.getahead.dwr.WebContextFactory; 

  

public class MessageDao { 

    
public Message save(Message message) { 

  

        WebContext ctx 
= WebContextFactory.get(); 

        HttpServletRequest req 
= ctx.getHttpServletRequest(); 

        

  

        System.out.println(
"========HttpServletRequest Begin======="); 

        System.out.println(
"req:" + req.getRemoteHost()); 

        System.out.println(
"req-session:" + req.getSession().getAttribute("dwr")); 

        System.out.println(
"text:" + req.getParameter("text")); 

        System.out.println(
"from:" + req.getParameter("from")); 

        System.out.println(
"=========HttpServletRequest End========"); 

  

        System.out.println(
"========Lucky DWR Begin======="); 

        System.out.println(
"text:" + message.getText()); 

        System.out.println(
"from:" + message.getFrom()); 

        System.out.println(
"=========Lucky DWR End========"); 

  

        
return message; 

    } 

  

    
public Message get() { 

        
return new Message("This is the first dwr demo!""test"); 

    } 




]]>
DWR对象构?深入分析dwr中的DWRUtil.getValues http://www.aygfsteel.com/pdw2009/archive/2006/11/21/82626.html有猫怼的日?/dc:creator>有猫怼的日?/author>Tue, 21 Nov 2006 14:38:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2006/11/21/82626.htmlhttp://www.aygfsteel.com/pdw2009/comments/82626.htmlhttp://www.aygfsteel.com/pdw2009/archive/2006/11/21/82626.html#Feedback0http://www.aygfsteel.com/pdw2009/comments/commentRss/82626.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/82626.html /**
 * Given a map, call getValue() for all the entries in the map using the entry key as an element id.
 * Given a string or element that refers to a form, create an object from the elements of the form.
 * @see http://getahead.ltd.uk/dwr/browser/util/getvalues
 */
DWRUtil.getValues = function(data) {

  //定义ele变量Q?/span>
  var ele;
//如果ele是一个字W串通过 $函数转化一下,$函数的用见我的上个帖子深入分析dwr中的DWRUtil.$
  if (typeof data == "string") ele = $(data);
//如果ele是个HTML元素对象Q通常应该是一个form对象
  if (DWRUtil._isHTMLElement(data)) ele = data;
 
 if (ele != null) {
    //如果ele不是form对象Q返回,只有form对象才有elements 属?/span>
    if (ele.elements == null) {
      alert("getValues() requires an object or reference to a form element.");
      return null;
    }
    //定义一个空对象reply
    var reply = {};
    //定义一个对象放key
    var value;
    //遍历form,表单key-value攑օreplyQ忽?lt;input type="image"/>
    for (var i = 0; i < ele.elements.length; i++) {
      if (ele[i].id != null) value = ele[i].id;
      else if (ele[i].value != null) value = ele[i].value;
      else value = "element" + i;
      reply[value] = DWRUtil.getValue(ele[i]);
    }
    return reply;
  }

//如果传入的参数对象不是表单对象,通常应该是与领域对象对应js对象
  else {
    //遍历对象属性,与属性对应的面元素值拷到js对象?/span>
    for (var property in data) {
      // Are there any elements with that id or name
      if ($(property) != null || document.getElementsByName(property).length >= 1) {
        data[property] = DWRUtil.getValue(property);
      }
    }
    return data;
  }
};

ȝ
1Q如果你需要用ajax完成表单提交的操作,那么你应该用DWRUtil.getValuesQ参数或者是个form对象Q或者是个与领域对象对应的js对象
2Q应该看到第二种用法的局限性,如果存在多个相同的表单或者是个复合的js对象Q那么第二种用法是不合适的
3Q第一U用法看似复杂,但更L(fng)zL?/span>
到底改如何选择取决于具体的应用
====================================================
 背景Q需要用ajax完成表单提交操作

核心代码如下Q?br />

    function addReply(frm){

 

 

。。。?/p>

 

//利用dwr自动?/span>frm提交的数据植?/span>js对象,

//DWRUtil.getValues的用见我的上篇帖子

var commentForm = DWRUtil.getValues(frm);

 

//调用服务器端的服?/span>

CommentService.writeComment(writecallback,commentForm );

。。。。?br />}

 

注意以下几点

1Q传l服务的js对象最好严g领域对象对应不能有key?"的属性否则会(x)报错,可以有多余?的属性,但后C(x)出现一些烦(ch)人日志信息告诉你无法匚w

2Q对于领域对象来_(d)dwr在{换时?x)遍历所有getҎ(gu)Q根据传入的js对象属性进行反不好了,Z么要遍历getҎ(gu)Q真是奇怪啊Q,所以注意你的getҎ(gu)要健壮避免后C(x)出很多日志信息汇报空指针之类的错?br />


3Q关于本C递的js对象Q必ȝ构与领域对象对应。从抽象的角度看多数情况领域对象完 ?全可以用数组和hashl构描述Q何冉|谓的对应只是属性的对应Q所以合理的使用Array和Object完全可以实现js对象和领域对象的匚w

 

4Q必配|合适的转化?/span>?/span>dwr知道如何你传入?/span>js对象转化为领域对?/span>

 

5Q用DWRUtil.getValues(frm)或者DWRUtil.getValues(obj)攉提交的数?/span>


   方式的区别详见该文上半部?/p>


]]>
DWR例子(转自于IBM 开发社?http://www.aygfsteel.com/pdw2009/archive/2006/11/18/81952.html有猫怼的日?/dc:creator>有猫怼的日?/author>Sat, 18 Nov 2006 11:40:00 GMThttp://www.aygfsteel.com/pdw2009/archive/2006/11/18/81952.htmlhttp://www.aygfsteel.com/pdw2009/comments/81952.htmlhttp://www.aygfsteel.com/pdw2009/archive/2006/11/18/81952.html#Feedback0http://www.aygfsteel.com/pdw2009/comments/commentRss/81952.htmlhttp://www.aygfsteel.com/pdw2009/services/trackbacks/81952.html阅读全文

]]>
XMLHttpRequest的一单例?/title><link>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70049.html</link><dc:creator>有猫怼的日?/dc:creator><author>有猫怼的日?/author><pubDate>Sat, 16 Sep 2006 08:27:00 GMT</pubDate><guid>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70049.html</guid><wfw:comment>http://www.aygfsteel.com/pdw2009/comments/70049.html</wfw:comment><comments>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70049.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/pdw2009/comments/commentRss/70049.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/pdw2009/services/trackbacks/70049.html</trackback:ping><description><![CDATA[ <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">html</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">head</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">title</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Example 1</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">title</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">script</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> <br /> <br />  </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> req;<br />  </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">var</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> which;<br /><br />  </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> retrieveURL(url) {<br />    </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (window.XMLHttpRequest) { </span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> Non-IE browsers</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> <br /> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">      req </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> XMLHttpRequest();<br />      req.onreadystatechange </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> processStateChange;<br />      </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">try</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> {<br />        req.open(</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">GET</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, url, </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />      } </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">catch</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (e) {<br />        alert(e);<br />      }<br />      req.send(</span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">null</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />    } </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">else</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (window.ActiveXObject) { </span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> IE</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> <br /> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">      req </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">new</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> ActiveXObject(</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Microsoft.XMLHTTP</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />      </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (req) {<br />        req.onreadystatechange </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> processStateChange;<br />        req.open(</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">GET</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">, url, </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">true</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">);<br />        req.send();<br />      }<br />    }<br />  }<br /><br />  </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">function</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> processStateChange() {<br />    </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (req.readyState </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">4</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">) { </span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> Complete</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> <br /> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">      </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">if</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> (req.status </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">==</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">200</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">) { </span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5">//</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> OK response</span> <span style="COLOR: #008000; BACKGROUND-COLOR: #f5f5f5"> <br /> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">        document.getElementById(</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">urlContent</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">).innerHTML </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">=</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> req.responseText;<br />      } </span> <span style="COLOR: #0000ff; BACKGROUND-COLOR: #f5f5f5">else</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> {<br />        alert(</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">Problem: </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">"</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> </span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5">+</span> <span style="COLOR: #000000; BACKGROUND-COLOR: #f5f5f5"> req.statusText);<br />      }<br />    }<br />  }<br /><br /></span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">script</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">head</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">body</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">h1</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Example 1</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">h1</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />Simple URL retrieval and display.</span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">hr</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">p </span> <span style="COLOR: #ff0000">align</span> <span style="COLOR: #0000ff">="right"</span> <span style="COLOR: #0000ff">><</span> <span style="COLOR: #800000">a </span> <span style="COLOR: #ff0000">href</span> <span style="COLOR: #0000ff">="home.do"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Return home</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">a</span> <span style="COLOR: #0000ff">></</span> <span style="COLOR: #800000">p</span> <span style="COLOR: #0000ff">><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />This example allows the user to enter a URL, which is then retrieved and<br />displayed in a </span> <span style="COLOR: #ff0000">&lt;</span> <span style="COLOR: #000000">span</span> <span style="COLOR: #ff0000">&gt;</span> <span style="COLOR: #000000">.  This demonstrates that what is retrieved is NOT<br />treated as an HTML document but rather a simple stream of data, hence the<br />document is not parsed and page events don't fire, images don't get retrieved,<br />etc.<br /></span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">b</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Note that you will get a security warning if the domain you are accessing<br />is not the same as this example (which I assume it won't be).  In fact,<br />some browsers will not allow this (Firefox), while others will with a<br />warning (IE).</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">b</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">form</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">input </span> <span style="COLOR: #ff0000">type</span> <span style="COLOR: #0000ff">="text"</span> <span style="COLOR: #ff0000"> name</span> <span style="COLOR: #0000ff">="urlToRetrieve"</span> <span style="COLOR: #ff0000"> size</span> <span style="COLOR: #0000ff">="50"</span> <span style="COLOR: #ff0000"> value</span> <span style="COLOR: #0000ff">="http://www.omnytex.com"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">input </span> <span style="COLOR: #ff0000">type</span> <span style="COLOR: #0000ff">="button"</span> <span style="COLOR: #ff0000"> name</span> <span style="COLOR: #0000ff">="getURL"</span> <span style="COLOR: #ff0000"> value</span> <span style="COLOR: #0000ff">="Get URL Contents"</span> <span style="COLOR: #ff0000"> onClick</span> <span style="COLOR: #0000ff">="retrieveURL(urlToRetrieve.value);"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">form</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">table </span> <span style="COLOR: #ff0000">border</span> <span style="COLOR: #0000ff">="1"</span> <span style="COLOR: #ff0000"> bordercolor</span> <span style="COLOR: #0000ff">="#000000"</span> <span style="COLOR: #ff0000"> cellpadding</span> <span style="COLOR: #0000ff">="5"</span> <span style="COLOR: #ff0000"> cellspacing</span> <span style="COLOR: #0000ff">="0"</span> <span style="COLOR: #ff0000"> width</span> <span style="COLOR: #0000ff">="100%"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />  </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">tr</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />    </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">td</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />      </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">span </span> <span style="COLOR: #ff0000">id</span> <span style="COLOR: #0000ff">="urlContent"</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000">Retrieved content will be displayed here</span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">span</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />    </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">td</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br />  </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">tr</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">table</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"><</span> <span style="COLOR: #800000">br</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> <br /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">body</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> <span style="COLOR: #0000ff"></</span> <span style="COLOR: #800000">html</span> <span style="COLOR: #0000ff">></span> <span style="COLOR: #000000"> <br /> </span> </div> <br />q例子很单是一个ajax最原始的实始了<img src ="http://www.aygfsteel.com/pdw2009/aggbug/70049.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/pdw2009/" target="_blank">有猫怼的日?/a> 2006-09-16 16:27 <a href="http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70049.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DWR2配置?qing)入门例?/title><link>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70048.html</link><dc:creator>有猫怼的日?/dc:creator><author>有猫怼的日?/author><pubDate>Sat, 16 Sep 2006 08:11:00 GMT</pubDate><guid>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70048.html</guid><wfw:comment>http://www.aygfsteel.com/pdw2009/comments/70048.html</wfw:comment><comments>http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70048.html#Feedback</comments><slash:comments>3</slash:comments><wfw:commentRss>http://www.aygfsteel.com/pdw2009/comments/commentRss/70048.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/pdw2009/services/trackbacks/70048.html</trackback:ping><description><![CDATA[以前用过dwr1做过一些简单的例子Q现在想认真深入的了解dwr2q希望以后有Z(x)用过奏V在我眼里dwr2是ajax世界的大女Q她清纯、可爱,最讨J2EEE序员喜Ƣ?br /><br /><br /><br /><strong>DWR嵌入到现有的J2EE(Web)目的的配置<br /></strong>    1、把dwr.jar文g拯到项目的lib目录下?br />    2、修攚w目的web.xml文gQ在文g中加入以下代?br /><font color="#d3d3d3">          <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #000000">          </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">servlet</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />               </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">servlet-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">dwr-invoker</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">servlet-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />               </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">servlet-class</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">org.directwebremoting.servlet.DwrServlet</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">servlet-class</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />               </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">init-param</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />                     </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">param-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">debug</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">param-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />                     </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">param-value</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">true</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">param-value</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />               </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">init-param</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />         </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">servlet</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />        </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">servlet-mapping</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />              </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">servlet-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">dwr-invoker</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">servlet-name</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />              </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">url-pattern</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000">/dwr/*</span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">url-pattern</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />       </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">servlet-mapping</span><span style="COLOR: #0000ff">></span></div><br /></font>    3、在WEB-INF目录中徏立dwr.xml文gQ例?<br />          <br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff"><?</span><span style="COLOR: #ff00ff">xml version="1.0" encoding="UTF-8"</span><span style="COLOR: #0000ff">?></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #0000ff"><!</span><span style="COLOR: #ff00ff">DOCTYPE dwr PUBLIC "-//GetAhead Limited//DTD Direct Web Remoting 2.0//EN" "http://www.getahead.ltd.uk/dwr/dwr20.dtd"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">dwr</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">init</span><span style="COLOR: #0000ff">></</span><span style="COLOR: #800000">init</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">allow</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />        </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">create </span><span style="COLOR: #ff0000">creator</span><span style="COLOR: #0000ff">="new"</span><span style="COLOR: #ff0000"> javascript</span><span style="COLOR: #0000ff">="dwrbo"</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />            </span><span style="COLOR: #0000ff"><</span><span style="COLOR: #800000">param </span><span style="COLOR: #ff0000">name</span><span style="COLOR: #0000ff">="class"</span><span style="COLOR: #ff0000"> value</span><span style="COLOR: #0000ff">="com.dwr.DwrBO"</span><span style="COLOR: #0000ff">/></span><span style="COLOR: #000000"><br />        </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">create</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">allow</span><span style="COLOR: #0000ff">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #0000ff"></</span><span style="COLOR: #800000">dwr</span><span style="COLOR: #0000ff">></span></div>以上dwr.xml文g内容q是比较好理解。就是发布一个类Q一个类发布了,那么可以通过js 的代码来调用q个c里的方法了?br />4、com.dwr.DwrBOcȝ内容如下Q?br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #0000ff">package</span><span style="COLOR: #000000"> com.dwr;<br /><br /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000"> org.directwebremoting.WebContextFactory;<br /><br /></span><span style="COLOR: #0000ff">import</span><span style="COLOR: #000000"> uk.ltd.getahead.dwr.ExecutionContext;<br /><br /><br /></span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">class</span><span style="COLOR: #000000"> DwrBO {<br />        <br />    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> String getInclude()</span><span style="COLOR: #0000ff">throws</span><span style="COLOR: #000000"> Exception{<br />        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> WebContextFactory.get().forwardToString(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">/a.jsp</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br />    }<br />    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> String getServerInfo(){<br />        </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> WebContextFactory.get().getServletContext().getServerInfo()</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"><br />        </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Run on JDK: </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">System.getProperty(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">java.specification.version</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">)</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000"><br />        </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Useing DWR :</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">+</span><span style="COLOR: #000000">ExecutionContext.get().getVersion();<br />    }<br />    </span><span style="COLOR: #0000ff">public</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">[] getNumbers(</span><span style="COLOR: #0000ff">boolean</span><span style="COLOR: #000000"> big){<br />        </span><span style="COLOR: #0000ff">if</span><span style="COLOR: #000000">(big){<br />            System.out.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">big==true</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br />            </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">[]{</span><span style="COLOR: #000000">1000</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">2000</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">3000</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">4000</span><span style="COLOR: #000000">};<br />        }</span><span style="COLOR: #0000ff">else</span><span style="COLOR: #000000">{<br />            System.out.println(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">big==false</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br />            </span><span style="COLOR: #0000ff">return</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">new</span><span style="COLOR: #000000"> </span><span style="COLOR: #0000ff">int</span><span style="COLOR: #000000">[]{</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">4</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">5</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">6</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">7</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">8</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">9</span><span style="COLOR: #000000">,</span><span style="COLOR: #000000">10</span><span style="COLOR: #000000">};<br />        }<br />        <br />    }<br />}<br /></span></div>q实际上是dwr官方|站上的例子. <br /><br />5、页面调用代?br /><div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ page language</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">java</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> pageEncoding</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">UTF-8</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-bean</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">bean</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-html</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">html</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-logic</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">logic</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-tiles</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">tiles</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-template</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">template</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><%</span><span style="COLOR: #000000">@ taglib uri</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">http://jakarta.apache.org/struts/tags-nested</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> prefix</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">nested</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">%></span><span style="COLOR: #000000"><br /><br /></span><span style="COLOR: #000000"><!</span><span style="COLOR: #000000">DOCTYPE HTML PUBLIC </span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">-//W3C//DTD HTML 4.01 Transitional//EN</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">html:html locale</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">true</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">head</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">html:base </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br />    <br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">title</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">试</span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">title</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Content-Type</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">text/html; charset=utf-8</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> </span><span style="COLOR: #000000">/></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">pragma</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">no-cache</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">cache-control</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">no-cache</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">expires</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">0</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">    <br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">keywords</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">keyword1,keyword2,keyword3</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">meta http</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">equiv</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">description</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> content</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">This is my page</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">style type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">text/css</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"><!--</span><span style="COLOR: #000000"><br />#Layer1 {<br />    position:absolute;<br />    left:47px;<br />    top:24px;<br />    width:677px;<br />    height:31px;<br />    z</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">index:</span><span style="COLOR: #000000">1</span><span style="COLOR: #000000">;<br />}<br />#context {<br />    position:absolute;<br />    left:45px;<br />    top:100px;<br />    width:679px;<br />    height:100px;<br />    z</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">index:</span><span style="COLOR: #000000">2</span><span style="COLOR: #000000">;<br />    background</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">color: #f8f8f8;<br />    clip: rect(10px,auto,auto,auto);<br />    margin</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">top: 10px;<br />}<br />#version {<br />    position: relative;<br />    top: 200px;<br />    width: 200px;<br />}<br />#Layer2 {<br />    position:absolute;<br />    left:26px;<br />    top:247px;<br />    width:485px;<br />    height:76px;<br />    z</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">index:</span><span style="COLOR: #000000">3</span><span style="COLOR: #000000">;<br />    background</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">color: f2f2f2;<br />    border: 1px solid #f4f4f4;<br />}<br />body {<br />    font</span><span style="COLOR: #000000">-</span><span style="COLOR: #000000">size: 12px;<br />}<br /></span><span style="COLOR: #000000">--></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">style</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">script type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">text/javascript</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">   src</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><%=request.getContextPath()%>/dwr/interface/dwrbo.js</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">></</span><span style="COLOR: #000000">script</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">script type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">text/javascript</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">   src</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><%=request.getContextPath()%>/dwr/engine.js</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">></</span><span style="COLOR: #000000">script</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">script type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">text/javascript</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">   src</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000"><%=request.getContextPath()%>/dwr/util.js</span><span style="COLOR: #000000">'</span><span style="COLOR: #000000">></</span><span style="COLOR: #000000">script</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> <br />    <br />    </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">SCRIPT language</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">javascript</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />         function loadinfo(data) {<br />              DWRUtil.setValue(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">context</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">, data);<br />        }<br />        function test(){<br />             dwrbo.getInclude(loadinfo);<br />        }<br />        function loadinfoversion(data){<br />            DWRUtil.setValue(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">version</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,data);<br />        }<br />        function showversion(){<br />            dwrbo.getServerInfo(loadinfoversion);<br />        }<br />        <br />        function createList(data){<br />            DWRUtil.removeAllOptions(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">numlist</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br />            DWRUtil.addOptions(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">numlist</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">,data);<br />        }<br />    <br />        function update(){<br />            alert(</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">xxxs</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">);<br />            dwrbo.getNumbers(createList,${</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">bigselect</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">}.checked);<br />        }<br />    <br />    </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">SCRIPT</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">head</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  <br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">body</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">    <br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">div id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Layer1</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />      </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">input type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">submit</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Submit</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> value</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">试</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> onClick</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">test()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />      </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">input type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">submit</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> name</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Submit</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> value</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">版本信息</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000"> onClick</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">showversion()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">div</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">div id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">context</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">div</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">div id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">version</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"> <br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">div</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">div id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">Layer2</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />     </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">input type</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">checkbox</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">   id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">bigselect onclick</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">update()</span><span style="COLOR: #000000">"</span><span style="COLOR: #000000">></span><span style="COLOR: #000000">数字cd</span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">br</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />     </span><span style="COLOR: #000000"><</span><span style="COLOR: #000000">select  id</span><span style="COLOR: #000000">=</span><span style="COLOR: #000000">numlist</span><span style="COLOR: #000000">></</span><span style="COLOR: #000000">select</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">div</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br />  </span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">body</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /></span><span style="COLOR: #000000"></</span><span style="COLOR: #000000">html:html</span><span style="COLOR: #000000">></span><span style="COLOR: #000000"><br /></span></div><br />q只是一个简单的例子Q至于具体的技术说明就不说了,因ؓ(f)很简单。把它脓(chung)出来当作一个笔记吧Q希望能q一步学?fn)DWR<img src ="http://www.aygfsteel.com/pdw2009/aggbug/70048.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/pdw2009/" target="_blank">有猫怼的日?/a> 2006-09-16 16:11 <a href="http://www.aygfsteel.com/pdw2009/archive/2006/09/16/70048.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> վ֩ģ壺 <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ȷ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">Ϸ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">˿</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">֦</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">̩</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ٲ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ʯ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ï</a>| <a href="http://" target="_blank">üɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">÷</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">β</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">۲</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ɽ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank">ͬ</a>| <a href="http://" target="_blank">γ</a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <a href="http://" target="_blank"></a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>