Tugas 5 PWeb

Nethaneel Patricio Linggar 

5025201180

PWeb C
Tugas 5 PWeb
Pada tugas ke-5 kelas Pemograman Web, saya telah membuat website dengan JQuery.



Source code:
    index.html
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
    <style>
        .container{
          display: flex;
          flex-direction: column;
          align-items: center;
        }
    </style>

    <title>Latihan Program Jquery</title>
  </head>
  <body class="container">
    <h2>Program Jquery</h2>
      <br>
      <br>
      <br>

      <center><h1></h1></center>

      <center><button type="button" class="btn btn-primary">PRESS ME</button></center>
 
    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
      <script>
      $(document).ready(function() {
          var nilai = 1;
         $(".btn").on("click", function(){
             $("h1").html(nilai++);
         });
      });
      </script>
  </body>
</html>

Comments

Popular posts from this blog

Tugas 7 PWeb

Tugas 8 PWeb