2011-10-02 93 views
1

我使用asp.net vs 2008.我正在嘗試jQuery。我得到這個錯誤 「microsoft jscript運行時錯誤對象不支持此屬性或方法jquery」
任何幫助表示讚賞。微軟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> 

回答

1

你缺少一個$我覺得

 $("button").click(function() { 
      $("p").hide(); 
     }); 
相關問題