-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathExample.html
More file actions
61 lines (46 loc) · 2.12 KB
/
Example.html
File metadata and controls
61 lines (46 loc) · 2.12 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js" integrity="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO" crossorigin="anonymous"></script>
<script>
function send_cookies(){
Name = document.getElementById("Name").value;
Value = document.getElementById("Value").value;
document.cookie = Name+" = "+Value;
document.getElementById("print_cookies").innerHTML = document.cookie;
}
</script>
</head>
<body>
<div class="container mt-5">
<div class="row justify-content-center">
<div class="col-sm-6 card border border-primary shadow-lg p-3">
<div class="m-2">
<label class="form-label">Cookies Name</label>
<input type="text" id="Name" class="form-control">
</div>
<div class="m-2">
<label class="form-label">Cookies Value</label>
<input type="text" id="Value" class="form-control">
</div>
<div class="m-2">
<button class="btn btn-primary" onclick="send_cookies()">Send Cookies</button>
</div>
</div>
</div>
</div>
<div class="container mt-4">
<div class="row justify-content-center">
<div class="col-sm-6">
<div class="alert alert-primary" role="alert">
<p id="print_cookies"></p>
</div>
</div>
</div>
</div>
</body>
</html>