c# - 运行时错误 : Syntax error in Java Script in clean Basic MVC 4 ASP. NET 项目

标签 c# javascript internet-explorer asp.net-mvc-4

我是 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/

相关文章:

c# - 字符串编码和内存管理

javascript - 实现图形来调用和显示rails数据库中的数据。

javascript - 如何从 firebase 存储中更快地加载图像?

css - 图片文字对齐,跨浏览器兼容性问题

在 IE6 和 IE7 中滚动 div 时,jQuery UI 按钮不会移动(有时会消失)

c# - 我的数据 GridView 未在浏览器中显示

c# - 获取特定值作为字符串 c#

c# - 提交修改viewstate所需的ajax asp表单

javascript - 从值获取对象属性名称

internet-explorer - 强制浏览器立即呈现部分响应