-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.html
78 lines (78 loc) · 2.09 KB
/
update.html
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<html>
<title>Update Search Engine</title>
<script src="jquery.min.js"></script>
<link rel="stylesheet" href="">
<style>
body{
display: flex;
flex-direction: column;
justify-content: center;
}
.f{
display: flex;
flex-direction: row;
justify-content: center;
margin-top: 30px;
}
form input[type=text]{
width: 500px;
height: 60px;
padding: 15px;
border:none;
border:1px solid #ddd;
display: block;
margin: auto
}
:root{
--site-color:#66bb6a;
--site-hover-color:#5da960;
--site-active-color:#43a047;
}
.btn {
border:none;
width: 260px;
font-size: 15px;
outline:none;
padding: 10px;
border-radius: 3px;
cursor: pointer;
display: inline-block;
margin:0 auto;
}
.btn-default {
background: var(--site-color);
color: #fff;
}
.mess{
padding: 40px 0;
font-size: 20px;
color: #43a047;
text-align: center;
}
</style>
<body>
<form action="" id="myForm">
<div class="mess"></div>
<input type="text" name="" id="" placeholder="Enter Search engine URL">
<div class="f">
<button type="submit" id="UpdateFile" class="btn btn-default"> Update Now </button>
</div>
</form>
</body>
<script>
$("#myForm").on("submit",function(e){
e.preventDefault();
$.ajax({
method:"POST",
url :"file.php",
data:"m="+$("form input").val()
}).then(function(res){
console.log(res)
if(res.toLowerCase() === "success"){
$(".mess").text("Successfully Updated !");
$("#myForm").trigger("reset");
}
})
})
</script>
</html>