本帖最后由 bbagg2008 于 2012-03-31 16:31:43 编辑

解决方案 »

  1.   

    在js中调用action,两种方式。
    1.window.location="action.do";
    2.ajax方式。
      

  2.   


    $.post("<%=basePath%>servlet路径", $("#表单id").serialize(), function(result)
    {
    if(result=="success"){

    }else{
    alert("失败"); }
    }); 给你个ajax的post例子
      

  3.   

    $.ajax({
      type:"post",//请求方式
      url :"/card.do?method=SelectEmpInfo&cardno="+cardno+"&bankno="+banknbr+"&keytype="+keytype+"&custid="+custid,
      dataType: "text",
      data : { },
      success : function(result){
      if(result == 'success') {
        //根据回调函数dosomething
        }
      });