BundleConfig某js文件 全部打包

    var server = HttpContext.Current.Server;
var jsFiles = System.IO.Directory.GetFiles(server.MapPath("~/Scripts/jsPlugs"),"*.js", SearchOption.AllDirectories);
var applicationPath = server.MapPath(null);
foreach (var file in jsFiles)
{
var url = file.Replace(applicationPath, "~").Replace("\\", "/");
bundles.Add(new ScriptBundle(url.Replace(".js", "")).Include
(
url
));
}
上一篇:event事件对象 兼容写法:var oEvent=ev||event;和取消事件冒泡


下一篇:点击文字可以选中相应的checkbox