-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
39 lines (36 loc) · 938 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="en">
<head>
<title>Membuat ajax</title>
<script src="jquery-3.3.1.min.js"></script>
<script>
// $(function() {
// jalankan_ajax();
// });
function jalankan_ajax(){
$.ajax({
url: "proses.php",
cache: false,
method: "GET",
data: $("form#contact").serialize(),
success: function(html){
$("#meong").html(html);
}
});
}
</script>
</head>
<body>
<h3>SILAHKAN LOGIN</h3>
<form id="contact" action="proses.php" method="GET">
Username : <input type="text" name="username"><br>
</br>
Password : <input type="text" name="password"><br>
</br>
<button type="button" onclick="return jalankan_ajax()">MASUK</button>
</form>
</br>
<div id="meong">
</div>
</body>
</html>