| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2963 人关注过本帖
标题:jQuery get使用回调函数获取键值对
只看楼主 加入收藏
czg123698741
Rank: 2
等 级:论坛游民
帖 子:348
专家分:84
注 册:2009-3-4
结帖率:78.99%
收藏
 问题点数:0 回复次数:0 
jQuery get使用回调函数获取键值对
大家好,如题,请帮帮忙~~~~~~~

servlet:
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        // TODO Auto-generated method stub
        PrintWriter out = response.getWriter();  
        String id=request.getParameter("ID");
        out.print("{myid:'fds',result:true}");
    }

JS:
function DelGoods(trId,gId){
    $(document).ready(function(){
        var $trid=$(trId);
        var $gid=$(gId);
        $.get("CarDelServlet", { ID: "12121212"},
          function(data,textStatus){
            alert(data);
            //我现在想分别输出myid 和 result 的JSON值
          });
    });
}
搜索更多相关主题的帖子: get jQuery 回调 函数 获取 
2010-09-02 00:07
快速回复:jQuery get使用回调函数获取键值对
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014327 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved