简体   繁体   English

如何在 Visual Studio 2008 中解决此 JQuery 智能感知问题?

[英]How to fix this JQuery intellisense in Visual Studio 2008 problem?

How can i solve this problem "Error updating JScript IntelliSense: D:\myProject\js\jquery-1.3.2.js: Object doesn't support this property or method @ 2139:1", i did all in this Visual Studio jscript intellisense error with jQuery 1.2.6?我该如何解决这个问题“更新 JScript IntelliSense 时出错:D:\myProject\js\jquery-1.3.2.js: Object 不支持此属性或方法@ 2139:1”,我在此Visual Studio jscript中完成了所有操作jQuery 1.2.6 的智能感知错误?

But no hope, should i edit something in my Visual studio options, or Visual studio has a problem?但没有希望,我应该在我的 Visual Studio 选项中编辑一些东西,还是 Visual Studio 有问题?

Make sure you've got the corresponding vsdoc file sitting beside jquery-1.3.2.js (in /js/ in your case here), and that it's properly named jquery-1.3.2-vsdoc.js .确保在 jquery-1.3.2.js 旁边有相应的 vsdoc 文件(在您的情况下是 /js/ ),并且它的名称正确为jquery-1.3.2-vsdoc.js

Also, while I don't think it's strictly necessary in your case, it generally can't hurt to have this hotfix installed: http://blogs.msdn.com/webdevtools/archive/2008/11/07/hotfix-to-enable-vsdoc-js-intellisense-doc-files-is-now-available.aspx此外,虽然我认为在您的情况下这不是绝对必要的,但安装此修补程序通常不会有什么坏处: http://blogs.msdn.com/webdevtools/archive/2008/11/07/hotfix-to -enable-vsdoc-js-intellisense-doc-files-is-now-available.aspx

Finally, this is a helpful FAQ on Visual Studio JavaScript Intellisense, by Jeff King (the Program Manager in charge of tooling): http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense-faq.aspx最后,这是 Jeff King(负责工具的项目经理)关于 Visual Studio JavaScript Intellisense 的有用常见问题解答: http://blogs.msdn.com/webdevtools/archive/2008/11/18/jscript-intellisense常见问题解答.aspx

Just for the record:仅作记录:

After adding the hotfix, and ensuring the the vsdoc has the same name, don't forget to do ctrl shift 'J' to force VS to update the Jquery.添加修补程序后,并确保 vsdoc 具有相同的名称,不要忘记执行 ctrl shift 'J' 以强制 VS 更新 Jquery。 You may also find that the VSdoc file has a 2 on the end of the file.您可能还会发现 VSdoc 文件在文件末尾有一个 2。 On my version this was no longer necessary, so I had to rename my vsdoc2.js to vsdoc.js: ctrl shift 'j' and boom: it works!在我的版本中,这不再是必需的,所以我不得不将我的 vsdoc2.js 重命名为 vsdoc.js: ctrl shift 'j' 和繁荣:它工作!

NB.注意。 With the hotfix, you will only need this on your page:使用此修补程序,您只需要在您的页面上使用它:

<script type="text/javascript" src="jsCode\jquery-1.3.2.js"></script>

The vsdoc.js file just needs to sit next to the jquery-1.3.2.js file, it doesn't need a reference, so if you have this: vsdoc.js 文件只需要放在 jquery-1.3.2.js 文件旁边,它不需要引用,所以如果你有这个:

<script type="text/javascript" src="jsCode\jquery-1.3.2-vsdoc.js"></script>

..as well, you can remove it. ..同样,您可以将其删除。 It isn't necessary and - I think - cock's things up.这没有必要,而且 - 我认为 - 公鸡的事情了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM