Unable to run Jquery from local folder

后端 未结 3 514
情书的邮戳
情书的邮戳 2021-01-29 15:50

Hi I am new to web development. I need to work with JQuery. Even I have tried one jquery successfully but only after copying file to my online ftp folde

相关标签:
3条回答
  • 2021-01-29 16:34

    You can use like this.

    <head>
         <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">/script>
    </head>
    <body>
    <p></P><input type=button value="Click me" id="btn1"/>
    
      <script>
    
      $('#btn1').click(function()
      {
          $('p').html("Hello World!");
      });
    
      </script>
    </body>
    
    0 讨论(0)
  • 2021-01-29 16:41

    Include head tag

    <html>
    <head>
          <!-- jQuery -->
          <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    </head>
    <body>
    </body>
    </html>
    
    0 讨论(0)
  • 2021-01-29 16:44

    Include in your head tag:

    <!-- jQuery -->
    <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    

    Like:

    <head>
      <!-- jQuery -->
      <script src="http://code.jquery.com/jquery-latest.min.js"></script>
    </head>
    
    0 讨论(0)
提交回复
热议问题