CNET中国旗舰网站

ZDNet China | CNET科技资讯网 | 政府采购 | 行业网站联盟





 
标题: [求助] 用dwr调服务器 返回一个值可以实现, 服务器的函数返回一个数组,js怎么取得数组的值?
一棵大白菜
白金会员
Rank: 7Rank: 7Rank: 7



UID 307581
精华 0
积分 4695
帖子 515
威望 2118
ZD币 666 元
阅读权限 150
注册 2008-3-14
状态 离线
  楼主
发表于 2008-4-21 16:52  资料  个人空间  短消息  加为好友 
开发者在线

用dwr调服务器 返回一个值可以实现, 服务器的函数返回一个数组,js怎么取得数组的值?

返回一个值可以实现   :   
  function   setCount(){   
      var   code=DWRUtil.getValue("engine");   
      OEMFeedbackMan.getCountByEngine(code,function(count){   
                      DWRUtil.setValue("input_times",count);   
    }   );     }   
    public   int   getCountByEngine(String   engine)   throws   DAOException,   SQLException   {   
                  int   count=0;   
                                  //省略   
                                    return   count;   
                            }   
  服务器的函数返回一个数组,js怎么取得数组的值?   
    public   String   []   getCountByEngine(String   engine)   throws   DAOException,   SQLException   {   
          String   []   engineSOAttribute   =   new   String[5];   
                    return     engineSOAttribute   ;   
  }




顶部
热点频道推荐: C/S开发| 数据库| WEB开发| 嵌入式| 项目管理|
 



当前时区 GMT+8, 现在时间是 2009-1-10 09:10

  Powered by Discuz! 5.5.0 © 2001-2007 Comsenz Inc.
Processed in 0.064786 second(s), 3/3 queries

清除 Cookies - 联系我们 - ZDNetChina中文社区 - 无图版