-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
32 lines (26 loc) · 1.32 KB
/
index.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
<!doctype html>
<html>
<head>
<title>Send on WhatsApp</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="icon" type="image/svg" href="whatsapp.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="card h-100 mx-auto justify-content-center text-center bg-dark rounded-0" style="position:absolute">
<img class="card-img-center mx-auto my-5" style="width: 10rem;" src="whatsapp.svg" alt="WhatsApp">
<div class="card-text">
<form>
<input type="tel" class="form-control my-5 mx-auto" id="num" style="font-size: 2rem; max-width: max-content;" placeholder="Enter Number">
<input type="submit" class="btn btn-lg bg-success mx-auto my-5" id="send" style="max-width: fit-content;">
</form>
</div>
</div>
<script>
document.getElementById("send").addEventListener("click", function () {
var url = "https://api.whatsapp.com/send?phone=" + document.getElementById("num").value.replace(/\s/g,"");
window.open(url);
})
</script>
</body>
</html>