这个问题在这里已经有了答案:EquivalentofString.formatinjQuery(21个回答)关闭6年前。这是我的代码$http.get("/Student/GetStudentById?studentId="+$scope.studentId+"&collegeId="+$scope.collegeId).then(function(result){});在上面的代码中,使用http服务根据id获取学生详细信息。但我想像在c#.net中一样编写上述服务string.format(eg:-string.format("/Student/GetStudentById/{0}