Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>My Aplication</title>
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
- <link rel="canonical" href="https://getbootstrap.com/docs/5.3/examples/navbar-fixed/">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
- <link href="css/style.css" rel="stylesheet">
- </head>
- <body class="bg-info">
- <nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
- <div class="container-fluid">
- <a class="navbar-brand" href="">My Aplication</a>
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarCollapse">
- <ul class="navbar-nav me-auto mb-2 mb-md-0">
- <li class="nav-item">
- <a class="nav-link active" aria-current="page" href="">Home</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="javascript:void(0);" id="FormTambahPasien">Tambah Pasien</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="javascript:void(0);" id="KeHalaman2">Halaman-2</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="javascript:void(0);" id="KeHalaman3">Halaman-3</a>
- </li>
- </ul>
- </div>
- </div>
- </nav>
- <main class="container">
- <div class="bg-body-tertiary p-5 rounded" id="MenampilkanHalaman">
- </div>
- </main>
- <script type="text/javascript" src="node_modules/jquery/dist/jquery.min.js"></script>
- <script>
- //Menampilkan Halaman Home Pertama Kali
- $.ajax({
- type : 'POST',
- url : '_Page/Home.php',
- success : function(data){
- $('#MenampilkanHalaman').html(data);
- }
- });
- //Ketika Halaman 1 Di Klik
- $('#FormTambahPasien').click(function(){
- $.ajax({
- type : 'POST',
- url : '_Page/Pasien/FormTambahPasien.php',
- success : function(data){
- $('#MenampilkanHalaman').html(data);
- }
- });
- });
- //Ketika Halaman 2 Di Klik
- $('#KeHalaman2').click(function(){
- $.ajax({
- type : 'POST',
- url : '_Page/Halaman_2.php',
- success : function(data){
- $('#MenampilkanHalaman').html(data);
- }
- });
- });
- //Ketika Halaman 3 Di Klik
- $('#KeHalaman3').click(function(){
- $.ajax({
- type : 'POST',
- url : '_Page/Halaman_3.php',
- success : function(data){
- $('#MenampilkanHalaman').html(data);
- }
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement