ASP.Net MVC 中配置Route的时候可以设置一个默认的Route. 比如我要在输入http://localhost的时候默认进入http://localhost/home/index.可以在Global.asax中这么配置: routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = &qu…
using System; namespace System.Web.Mvc { /// <summary>Represents a class that extends the <see cref="T:System.Web.HttpRequestBase" /> class by adding the ability to determine whether an HTTP request is an AJAX request.</summary>…
//获取url中的参数function getUrlParam(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象 var r = window.location.search.substr(1).match(reg); //匹配目标参数 if (r != null) return unescape(r[2]); return…