在Webmatrix中的JavaScript文件中启用jQuery Intellisense [英] Enabling jQuery Intellisense inside JavaScript file in Webmatrix

查看:102
本文介绍了在Webmatrix中的JavaScript文件中启用jQuery Intellisense的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WebMatrix中完成了以下操作。

I have done the following in WebMatrix.

我在HTML页面中导入了jQuery,其中包含jQuery文档,并在HTML script tag。

I imported jQuery inside my HTML page with documentation of jQuery and successfully enabled jQuery intellisense inside the HTML script tag.

 <script type="text/javascript"  src="JS/jquery-2.1.0.js" ></script>
 <script type="text/javascript"  src="JS/jquery-2.1.0-vsdoc.js" ></script>

现在我想在我的外部JavaScript文件中启用jQuery intellisense,它会如何工作?

Now I want to enable jQuery intellisense inside my external JavaScript file,How would it work?

推荐答案

通常,在Visual Studio中,您可以在文件开头使用 reference 指令。它将在当前脚本文件的脚本上下文中包含一个脚本文件。并且将启用IntelliSense。既然WebMatrix也是微软的,我相信这也应该有效:

Usually, in Visual Studio you can use reference directive in the beginning of the file. It will include a script file in the scripting context of the current script file. And IntelliSense will be enabled. Since WebMatrix is microsoft as well, I believe this should work too:

/// <reference path="JS/jquery-2.1.0.js" />
/// <reference path="JS/jquery-2.1.0-vsdoc.js" />

如果路径属性不起作用,请尝试文件 attribute。

if path attribute won't work, try file attribute.

http://yadi.sk / d / Szhp8tOJNLXYu
example

http://yadi.sk/d/Szhp8tOJNLXYu

这篇关于在Webmatrix中的JavaScript文件中启用jQuery Intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆