【问题标题】:Uncaught TypeError: Cannot read property 'fn' of undefined at util.js:68 at bootstrap.min.js:6未捕获的类型错误:无法在 bootstrap.min.js:6 处读取 util.js:68 处未定义的属性“fn”
【发布时间】:2019-10-10 14:08:51
【问题描述】:

我在运行我的应用程序时遇到了错误。运行应用程序时,我在控制台上看到此错误

Uncaught TypeError: Cannot read property 'fn' of undefined
    at util.js:68
    at util.js:10
    at bootstrap.min.js:6
    at bootstrap.min.js:6

这是我的源代码:

<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
        <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
        <script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
        @Styles.Render("~/Content/css")
        @Scripts.Render("~/bundles/modernizr")

    </head>
        <body>
            <!------ Include the above in your HEAD tag ---------->
            <div class="sidenav">
                <div class="login-main-text">
                </div>
            </div>
            <div class="main">
                <div class="col-md-6 col-sm-12">
                    <div class="login-form">
                        <form>
                            <div class="form-group">
                                <label>User Name</label>
                                <input type="text"id="userid" class="form-control" placeholder="User Name">
                            </div>
                            <div class="form-group">
                                <label>Password</label>
                                <input type="password" id="password" class="form-control" placeholder="Password">
                            </div> 
                            <input type="button" class="btn btn-black" value="Login" onclick="NullValidator()" @*window.location='Url.Action("Dashboard", "Dashboard")*@ />
                            @*<button type="submit" class="btn btn-black">Login</button>*@
                            <button type="submit" class="btn btn-secondary">Register</button>

                            <div class="form-group">
                                <a style="float:left">Forget Password ? </a>
                            </div>
                        </form>
                    </div>
                </div>
            </div>

            @Scripts.Render("~/bundles/jquery")
            @Scripts.Render("~/bundles/bootstrap")
        </body>
</html>

我尝试在此处搜索fn,但我没有在此页面以及应用程序的其他页面中使用它。所以我无法确定错误的原因。

【问题讨论】:

    标签: asp.net-mvc asp.net-mvc-4 bootstrap-4


    【解决方案1】:

    我通过添加以下代码解决了我的问题:

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    
    

    【讨论】:

    猜你喜欢
    • 2021-06-10
    • 2014-01-03
    • 2019-07-31
    • 2018-11-05
    • 2018-12-03
    • 2017-06-05
    • 1970-01-01
    • 2018-04-06
    • 1970-01-01
    相关资源
    最近更新 更多