• jQuery代码不能执行,必须在代码之前就要包含jQuery包


    <script>
        $(function () {
            $("#btnRegister").click(function () {
                location.href = "@Url.Content("~/Account/Register")";
            })
        });
    </script>

    不能执行,应该把Layout里的

     @Scripts.Render("~/bundles/jquery")
        @Scripts.Render("~/bundles/bootstrap")
        @RenderSection("scripts", required: false)

    放在<head></head>中间,放在代码执行之前。

  • 相关阅读:
    使用Mybatis时报错Invalid bound statement (not found):
    MyBatis学习(3)
    选数字
    看程序写结果
    NP
    完全平方数
    hahaha
    haha

    凝视
  • 原文地址:https://www.cnblogs.com/brown-birds/p/6028425.html
Copyright © 2020-2023  润新知