Visual Studio 2008 Express和jQuery
问题描述:
一个非常基本的问题。Visual Studio 2008 Express和jQuery
我刚刚安装了Visual Studio 2008 Express Edition,并准备使用jQuery。
我听说jQuery现在被Visual Studio支持,但我的问题是。
我需要做些什么来使用它?是否已包含在VS安装中,还是需要单独下载并参考下载的库?
谢谢
答
下载Visual Studio版本的jQuery(在名称中应该有vsdoc)here。
您可以使用this hotfix有自动检测vsdoc js文件,或使用这种略带hackish的解决方法:
在ASP.NET文件jQuery的智能提示:
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<% if (false) { %}
<script src="jquery-1.3.2-vsdoc.js" type="text/javascript"></script>
<% } %>
的“如果(假)“位确保脚本不会实际包含,但智能感知仍然会提取参考。
对于另一个js文件jQuery的智能提示:
// <reference path="jquery-1.3.2-vsdoc.js" />
答
不包括它的地方。您只需将
<script type="text/javascript">
// You may specify partial version numbers, such as "1" or "1.3",
// with the same result. Doing so will automatically load the
// latest version matching that partial revision pattern
// (i.e. both 1 and 1.3 would load 1.3.2 today).
google.load("jquery", "1.2.6");
google.setOnLoadCallback(function() {
// Place init code here instead of $(document).ready()
});
</script>
添加到您的母版页或单个页面(如果不使用母版页)。
感谢您的链接,但我已经看到了那个帖子了。我想知道是否有什么改变,特别是现在Web平台安装程序可用 – padn 2009-06-12 21:52:23