-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathburayabaklocalv3.html
More file actions
45 lines (34 loc) · 1.1 KB
/
burayabaklocalv3.html
File metadata and controls
45 lines (34 loc) · 1.1 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
<html>
<head>
</head>
<style>
textarea{outline:none;border:2px solid black;width:250px;height:100px;background-color:transparent}
input{outline:none;border:2px solid black;}
</style>
<body onload="veriyicek();" bgcolor="#333"><center>
<textarea autofocus id="textline"></textarea><br><br>
<button id="" onclick='kaydet()'>kaydet</button>
<button id="" onclick='veriyicek()'>görüntüle</button>
<button id="" onclick='veriyisil()'>sil</button>
<p id="sirke"></p>
<br><br><br><br><br>
<script>
function kaydet() { //remember code var
texttosave = document.getElementById('textline').value;
localStorage.setItem('elmalıturta', texttosave);
var existing = localStorage.getItem('elmalıturta');
var data = existing ? existing + ' ' : 'tuna';
localStorage.setItem('elmalıturta', data);
}
function veriyicek() { //recall code
document.getElementById('sirke').innerHTML = localStorage.getItem('elmalıturta');
document.getElementById('textline').value = localStorage.getItem('elmalıturta');
}
function veriyisil() {
localStorage.removeItem("elmalıturta");
alert("veri silindi");
}
</script>
</center>
</body>
</html>