开发者

My jQuery is not working

开发者 https://www.devze.com 2022-12-17 20:44 出处:网络
<%@ Page Language=\"VB\" AutoEventWireup=\"false\" CodeFile=\"Default.aspx.vb\" Inherits=\"_Default\" %>
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

   <script language="javascript" type="text/javascript">
    $(document).ready(function()
  {
    $(".button1").c开发者_JS百科lick(function ()
    {
      $("p").hide("slow");
    });
    $(".button2").click(function ()
    {
      $("p").show("slow");
    });
  });
    </script>  
     </head>
<body>
    <form id="form1" runat="server">


    <input id="Button1" type="button" value="button" class="button1"/>
    <input id="Button2" type="button" value="button" class="button2"/><h2>Welcome to F5 Technologies </h2>
  <p>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp F5 Technologies is a rapidly developing company, acquiring its position on the business market,
  Our company helps make products 
     delivery more effective, efficient, and meaningful to our customers, and allow them to take greater 
     responsibility for their own new products.Software is developed by  the most experienced development staffs.   </p>


    </form>
</body>
</html>


you need to include the jQuery library.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>


You didn't include the jQuery library itself:

<script src="jquery.min.js" type="text/javascript">
</script>

You can also include it from a CDN:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js"
  type="text/javascript"></script>


Despite my comment on the question, it looks like the main culprit is that you aren't actually referencing the jQuery JS file. Try something like:

<script type="text/javascript" src="Scripts/jquery-1.3.2.js"></script>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号