window.location.href("login.jsp?type"=+a+'&age'=+b);
不是$ 是&window.location.href("login.jsp?type=a&age=b");