我是 ASP.NET 新手,我创建了 MVC 4 ASP .NET 项目。它在浏览器中运行,但我收到下面的错误,但我不明白为什么会这样。
Błąd czasu wykonywania kodu JavaScript
表示运行时错误 Java 脚本
。
'iexplore.exe' (Script): Loaded 'Script Code (Windows Internet Explorer)'.
Exception was thrown at line 5302, column 6 in http://localhost:6468/Scripts/jquery-1.8.2.js
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
Exception was thrown at line 37, column 60610 in http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
Exception was thrown at line 37, column 60451 in http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
Exception was thrown at line 37, column 60451 in http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
Exception was thrown at line 37, column 60451 in http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
Exception was thrown at line 37, column 60451 in http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
0x800a139e - Błąd czasu wykonywania kodu JavaScript: SyntaxError
The thread 0x1324 has exited with code 259 (0x103).
The thread 0x11f8 has exited with code 259 (0x103).
The thread 0x954 has exited with code 259 (0x103).
_Layout.cshtml 文件:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>@ViewBag.Title</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
</head>
<body>
<div id="header">
<h1>ASP.NET MVC MUSIC STORE</h1>
<ul id="navlist">
<li class="first"><a href="/" id="current">home</a></li>
<li><a href="/Store/">Store</a></li>
</ul>
</div>
@RenderBody()
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", required: false)
</body>
</html>
http://localhost:3176/d36ef192c476437f94f058c98480760b/browserLink
:
第 37 行 60541 号:
{return w.apply(f,x.call(m.querySelectorAll(n),0)),f}catch(p){}finally{k||d.removeAttribute("id")}}
最佳答案
在 here 上回答了类似的问题。在此重新发布。
Those are handled exceptions, correct? If so, you can safely ignore all of the JavaScript Syntax "Errors" in your Output window. The jQuery team finds it acceptable to use handled Exceptions for logic flow. Yes, this decision makes debugging your application through VS more difficult. It clouds up the Output window.
For more information check this jQuery ticket 14123.
关于c# - 运行时错误 : Syntax error in Java Script in clean Basic MVC 4 ASP. NET 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24352728/