我在 MVC3 应用程序中有以下脚本,但我认为它们没有被使用,只是被引用。有没有一种简单的方法来判断它们是否在标记中的某个地方使用?
<script src="/Scripts/MicrosoftAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
<script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>
最佳答案
摘自“Pro ASP.NET MVC 3 Framework,第三版”
There are also a set of files in the '~/Scripts' folder whose names start with Microsoft, for example MicrosoftAjax.js
These are from version 2 of the MVC framework and predate Microsoft fully embracing jQuery in ASP.NET MVC. We don't discuss these files since they have been superseded and are included in MVC framework just for compatibillity with earlier versions.
由于这本书是由 Adam Freeman 和 Steven Sanderson 撰写的(后来为 Microsoft 工作),所以我认为这对我来说已经足够了;)
关于asp.net-mvc-3 - 如何判断 MicrosoftAjax javascript 库是否未被使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7756125/