fadilzteria

index 3

Nov 20th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.80 KB | None | 0 0
  1. <!DOCTYPE html>  
  2.  <html>  
  3.  <head>  
  4.    <title>Pendaftaran Siswa Baru|| SMAN 1 Tanjung</title>  
  5.    <script>  
  6.       function showsiswa() {  
  7.         if (window.XMLHttpRequest) {  
  8.           xhttp = new XMLHttpRequest();  
  9.         }  
  10.         xhttp.onreadystatechange = function() {  
  11.           if (this.readyState == 4 && this.status == 200){  
  12.             document.getElementById("demo").innerHTML = this.responseText;  
  13.           }  
  14.         };  
  15.         xhttp.open("GET", "list-siswa.php", true);  
  16.         xhttp.send();  
  17.       }  
  18.       function daftar() {  
  19.         if (window.XMLHttpRequest) {  
  20.           xhttp = new XMLHttpRequest();  
  21.         }  
  22.         xhttp.onreadystatechange = function() {  
  23.           if (this.readyState == 4 && this.status == 200){  
  24.             document.getElementById("demo").innerHTML = this.responseText;  
  25.           }  
  26.         };  
  27.         xhttp.open("GET", "form-daftar.php", true);  
  28.         xhttp.send();  
  29.       }  
  30.       function edit() {  
  31.         if (window.XMLHttpRequest) {  
  32.           xhttp = new XMLHttpRequest();  
  33.         }  
  34.         xhttp.onreadystatechange = function() {  
  35.           if (this.readyState == 4 && this.status == 200){  
  36.             document.getElementById("demo").innerHTML = this.responseText;  
  37.           }  
  38.         };  
  39.         xhttp.open("GET", "form-edit.php", true);  
  40.         xhttp.send();  
  41.       }  
  42.     </script>  
  43.   </head>  
  44.   <body>  
  45.     <header>  
  46.       <h3>Pendaftaran Siswa Baru</h3>  
  47.       <h1>SMAN 1 Tanjung</h1>  
  48.     </header>  
  49.     <h4>Menu</h4>  
  50.     <p><button type="button" onclick="showsiswa()">Pendaftar</button></p>  
  51.     <p><button type="button" onclick="daftar()">Daftar Baru</button></p>  
  52.     <div id="demo"></div>  
  53.   </body>  
  54. </html>
Advertisement
Add Comment
Please, Sign In to add comment