日期:2014-05-20  浏览次数:20810 次

JQUERY POST()方法传参后台获取问题
JScript code


function showMen(id ,branch,wherestation){
        
       
        var params = {"wherestation2":wherestation,"branch2":branch};
        
                   // alert(params)
          //document.write(params.wherestation2); 
            //document.write(params.branch2); 

        $.post("ajaxRequest.action",params,function(html){
                //alert(html);
                $("#men"+id).html(html);
        });
        
}



这样在 ACTION 类里 怎么获得 params 传来的值

------解决方案--------------------
你可以定义两个同名属性试试
记得写上get/set方法