0

我试图在同一个包中添加一些脚本

bundles.Add(new ScriptBundle("~/bundles/scripts").Include("~/Scripts/jquery.nivo.slider.pack.js",
            "~/Scripts/jquery.jcarousel.min.js",
            "~/Scripts/jquery.jcarousel-control.min.js",
            "~/Scripts/jquery.jcarousel-autoscroll.min.js"));

但结果我只有一个页面,第一个脚本

<script src="/Scripts/jquery.nivo.slider.pack.js"></script>

(当然,我在Scripts文件夹中添加了所有脚本。)
怎么了?我该如何解决?

4

2 回答 2

1

链接Include调用:

bundles.Add(new ScriptBundle("~/bundles/scripts")
    .Include("~/Scripts/jquery.nivo.slider.pack.js")
    .Include("~/Scripts/jquery.jcarousel.min.js")
    .Include("~/Scripts/jquery.jcarousel-control.min.js")
    .Include("~/Scripts/jquery.jcarousel-autoscroll.min.js"))
于 2013-09-07T10:31:40.503 回答
0

尝试这个,

bundles.Add(new ScriptBundle("~/bundles/Yourscripts").Include(
            "~/Scripts/jquery.nivo.slider.pack.js",
            "~/Scripts/jquery.jcarousel.min.js",
            "~/Scripts/jquery.jcarousel-control.min.js",
            "~/Scripts/jquery.jcarousel-autoscroll.min.js"));

它有效。

于 2013-09-07T11:22:02.490 回答