-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path38-local-storage.html
36 lines (32 loc) Β· 1.02 KB
/
38-local-storage.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
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>localStorage</title>
<style>
body {
padding: 16px;
}
p {
margin-bottom: 0;
}
</style>
</head>
<body>
<!-- 1st block -->
<button class="js-addLocal">Add to LocalStorage</button>
<button class="js-removeLocal">Remove from LocalStorage</button>
<button class="js-getLocal">Get from LocalStorage</button>
<button class="js-addSession">Add to SessionStorage</button>
<button class="js-removeSession">Remove from SessionStorage</button>
<!-- 2nd block FORM-->
<p>Value from localStorage: <span id="output"></span></p>
<form id="message-form">
<input type="text" class="input" name="message" />
<button type="submit" class="btn">Save</button>
</form>
<script src="./app/38-local-storage.js"></script>
</body>
</html>