gpt4 book ai didi

jquery - 通过 NuGet 保持 jQuery 更新

转载 作者:行者123 更新时间:2023-12-01 04:23:02 25 4
gpt4 key购买 nike

当我通过 NuGet 添加最新的 jQuery 包时,它会将 jQuery 脚本文件下载到 ~/packages/jQuery.1.7.1/Content/Scripts

在我的 MVC 应用程序的 ~/Scripts/ 文件夹中保持这些更新的最佳方法是什么?我可以在其中从我的母版页引用它们?

<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")"></script>

最佳答案

When I add the latset jQuery package via NuGet, it downloads the jQuery script files to ~/packages/jQuery.1.7.1/Content/Scripts.

此外,NuGet 包还会将 jquery-1.7.1.js 文件复制到 ~/Scripts 文件夹,您可以在其中直接引用它。

但是,如果您正在开发一个从互联网上可见的网站,最好使用 CDN 来提供这些脚本,以提高网站的性能。谷歌 provides one .

关于jquery - 通过 NuGet 保持 jQuery 更新,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8862891/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com