File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
6+ < title > Document</ title >
7+
8+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css " rel ="stylesheet " integrity ="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT " crossorigin ="anonymous ">
9+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js " integrity ="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO " crossorigin ="anonymous "> </ script >
10+
11+ < script >
12+
13+ function send_cookies ( ) {
14+
15+ Name = document . getElementById ( "Name" ) . value ;
16+ Value = document . getElementById ( "Value" ) . value ;
17+
18+ document . cookie = Name + " = " + Value ;
19+
20+ document . getElementById ( "print_cookies" ) . innerHTML = document . cookie ;
21+
22+ }
23+
24+ </ script >
25+
26+ </ head >
27+ < body >
28+
29+ < div class ="container mt-5 ">
30+ < div class ="row justify-content-center ">
31+ < div class ="col-sm-6 card border border-primary shadow-lg p-3 ">
32+ < div class ="m-2 ">
33+ < label class ="form-label "> Cookies Name</ label >
34+
35+ < input type ="text " id ="Name " class ="form-control ">
36+ </ div >
37+ < div class ="m-2 ">
38+ < label class ="form-label "> Cookies Value</ label >
39+
40+ < input type ="text " id ="Value " class ="form-control ">
41+ </ div >
42+
43+ < div class ="m-2 ">
44+ < button class ="btn btn-primary " onclick ="send_cookies() "> Send Cookies</ button >
45+ </ div >
46+ </ div >
47+ </ div >
48+ </ div >
49+
50+ < div class ="container mt-4 ">
51+ < div class ="row justify-content-center ">
52+ < div class ="col-sm-6 ">
53+ < div class ="alert alert-primary " role ="alert ">
54+ < p id ="print_cookies "> </ p >
55+ </ div >
56+ </ div >
57+ </ div >
58+ </ div >
59+
60+ </ body >
61+ </ html >
You can’t perform that action at this time.
0 commit comments