【问题标题】:microsoft jscript runtime error object doesn't support this property or method jquerymicrosoft jscript 运行时错误对象不支持此属性或方法 jquery
【发布时间】:2011-10-02 13:41:23
【问题描述】:

我使用 asp.net vs 2008。我正在尝试 jquery。我收到此错误 “microsoft jscript 运行时错误对象不支持此属性或方法 jquery”
任何帮助表示赞赏。

这是我正在使用的代码。

 <title></title>
    <script type="text/javascript" src="jquery-1.6.4.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            ("button").click(function() {
                $("p").hide();
            });
        });  </script>
</head>
<body>
    <form id="form1" runat="server">
   <h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
    </form>
</body>

【问题讨论】:

    标签: jquery asp.net


    【解决方案1】:

    我认为你错过了一个 $

            $("button").click(function() {
                $("p").hide();
            });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-19
      • 1970-01-01
      • 2013-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多