ajax提交参数过滤空值

 var param = "id="+userid+"&height="+$(".Height").val()+"&bloodl="+$(".dbp").val()+"&bloodh="+$(".sbp").val()+"&weight="+$(".bodyWeight").val()+"&nickName=" + $("#nick_name").val() + "&phone="+$("#phone").val()+ "&gender=" + gender + "&birth=" + $("#birth").val() + "&email=" + $("#email").val();
        AjaxStart("member/HKEJRegister",vialeParam(param), function (data) {
            if (isEmpty(data, ""))
                return;
            else
                Alert('成功');
            toUrl("my.html");
        }); 


     function vialeParam(param){//参数过滤
    	 var newParam="";
    	var params = param.split("&");
    	for(var i = 0;i


你可能感兴趣的:(javascript,jquery,HTML5)