jscript 运行时错误
我有一个 Visual Studio 2010 项目。它在我的笔记本电脑上运行良好,但在我的台式机上它无法运行。该错误是 Microsoft JScript 运行时错误:“$”未定义。这是这台机器上装有 Visual Studio 的代码
function fadeDiv() {
$(function () {
$('#ctl00_ContentPlaceHolder1_lblStatus').fadeIn('slow').delay(5000).fadeOut('slow');
});};
,但我必须将其删除并重新安装,因为 silverlight SDK 有问题。几周以来它一直运行良好,直到使用 .net 4.0 将这段代码插入到我们的 asp.net 代码中。我已经运行 sfc /scannow 并且没有报告任何错误。我也重启了。 Jscript 文件存在于 c:\windows\system32 中的其他位置。这是一台 Windows 7 机器 64 位。机器已完全修补。我的机器上 c:\windows\system32 中的 jscript 文件的版本是 5.8.7601.16982 和 799 KB.无论如何..当然希望有人可以帮助我谢谢shannon
I have a visual studio 2010 project. It runs from my notebook fine but from my desktop it won't run. The error is Microsoft JScript runtime error: '$' is undefined. Here is the code
function fadeDiv() {
$(function () {
$('#ctl00_ContentPlaceHolder1_lblStatus').fadeIn('slow').delay(5000).fadeOut('slow');
});};
this machine had visual studio on it, but i had to remove it and reinstall it again because the silverlight SDK had issue. It has been working fine now for a couple of weeks until this code was inserted into our asp.net code using .net 4.0. I've run sfc /scannow and it reported no errors. I've also rebooted. The Jscript file exists amongst other places in c:\windows\system32. This is a windows 7 machine 64 bit. The machine is fully patched. the jscript file that is on my machine in c:\windows\system32 is version 5.8.7601.16982 and 799 KB.anyway.. sure hope someone can help me outthanksshannon
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
$ 变量在几个库中使用 - 最流行的是 JQuery。它不是普通的 JavaScript。尝试在代码顶部包含 JQuery 脚本:
The $ variable is used in a couple libraries - most popularly JQuery. It is not Vanilla Javascript. Try including the JQuery script at the top of your code: