JQ中 如何使用post 或 Get 方法 传参数 
  举俩个简单的例子就好了 

解决方案 »

  1.   


     $.ajax({
                url: 'bidAddress.ashx',
                type: 'GET',
                dataType: "json",
                data: { bid:bid,productId:productId},
                cache: false,
                success: function(data) {
    ...............
    }
      

  2.   

     $.get("a.aspx", { yhm: document.getElementById("aaa").value},
      

  3.   

    $.ajax({
                type:"GET",
                url:"JudgeMemberName.aspx",
                dataType:"html",
                data:"userName="+$("#txtMemberName").val(),
                beforeSend:function(XMLHttpRequest)
                    {
                        $("#showResult").text("正在查询");
                        //Pause(this,100000);
                    },
                success:function(msg)
                    {   
                        $("#showResult").html(msg);
                        $("#showResult").css("color","red");
                        if(msg=="您可以使用此用户名")
                        {
                            //用户名必须是以字母开头,有字母,数字或下划线,组成的5~20的字符串的正则表达式
                            var regx = /^[a-zA-Z][a-zA-Z0-9_]{4,15}$/;
                            var UserName = $("#txtMemberName").val();
                            if(regx.test(UserName))
                            {
                                $("#showResult").html("");
                                return true;
                            }else{
                                $("#showResult").html("用户名必须是以字母开头,有字母,数字或下划线,组成的5~20的字符串");
                                $("#showResult").css("color","red");
                                return false;
                            }
                        }else{
                            return false;
                        }
                    },
                complete:function(XMLHttpRequest,textStatus)
                    {
                        //隐藏正在查询图片
                    },
                error:function()
                   {
                        //错误处理
                   }
                });
      

  4.   

       那POST 的参数怎么获取啊?
      

  5.   

    http://topic.csdn.net/u/20100312/14/6A9AC687-A120-4F0B-B94F-A685C9343A76.html