我尝试在同一个包中添加一些脚本
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
文件夹中添加了所有脚本。)
怎么了?我该如何解决?
答案 0 :(得分: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"))
答案 1 :(得分: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"));
它有效。