|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8"><link rel="shortcut icon" href="data:image/gif;base64,R0lGODlhFAAWAMIAAP/////Mmcz//5lmMzMzMwAAAAAAAAAAACH+TlRoaXMgYXJ0IGlzIGluIHRoZSBwdWJsaWMgZG9tYWluLiBLZXZpbiBIdWdoZXMsIGtldmluaEBlaXQuY29tLCBTZXB0ZW1iZXIgMTk5NQAh+QQBAAACACwAAAAAFAAWAAADVCi63P4wyklZufjOErrvRcR9ZKYpxUB6aokGQyzHKxyO9RoTV54PPJyPBewNSUXhcWc8soJOIjTaSVJhVphWxd3CeILUbDwmgMPmtHrNIyxM8Iw7AQA7
|
|
" />
|
|
|
|
<title>text </title>
|
|
|
|
<style type="text/css">
|
|
body {
|
|
background-color: #030;
|
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAPCAQAAAC/mnxTAAAAIUlEQVR4AWPc7sywl4GBgUSScTsD6YBsbYPNkaOOHHUkALSqN8mc6mmTAAAAAElFTkSuQmCC );
|
|
background-repeat: repeat ;
|
|
|
|
margin:0;
|
|
color: green ;
|
|
text-align: center;
|
|
align-content: center;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textarea {
|
|
background-color: #001f00;
|
|
color: yellow;
|
|
border: 2px solid #006400;
|
|
border-radius: 4px;
|
|
background-image: url(https://grizzlyganja.neocities.org/stuff/bs-binary-admin/pifmgr-19.png);
|
|
background-repeat: no-repeat;
|
|
background-position: bottom left;
|
|
padding-left: 0.5em;
|
|
}
|
|
|
|
.button3 {
|
|
background-color: #003300;
|
|
border: 1px solid#006400;
|
|
color: lime;
|
|
padding: 4px 4px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
font-size: 15px;
|
|
margin: 2px 2px;
|
|
cursor: pointer;
|
|
border-radius: 4px;
|
|
|
|
}.button3:hover {
|
|
background-color: #3e8e41;
|
|
border-radius: 2px;
|
|
color: red;
|
|
}
|
|
|
|
|
|
</style>
|
|
|
|
|
|
|
|
</head><body><br><br> <center>
|
|
|
|
<br>
|
|
<textarea id="myTextarea" rows="10" cols="85"> </textarea>
|
|
<br>
|
|
<button onclick="myLoad()" class=" button3">Load from localStorage</button>
|
|
|
|
<button onclick="mySave()" class=" button3">Save to localStorage</button>
|
|
|
|
<button onclick="deleteItems()" class=" button3">Delete localStorage</button>
|
|
|
|
<script>
|
|
function mySave() {
|
|
var myContent = document.getElementById("myTextarea").value;
|
|
localStorage.setItem("myContent", myContent);
|
|
}
|
|
function myLoad() {
|
|
var myContent = localStorage.getItem("myContent");
|
|
document.getElementById("myTextarea").value = myContent;
|
|
}
|
|
|
|
function deleteItems() {
|
|
localStorage.clear("myContent");
|
|
}
|
|
</script>
|
|
|
|
|
|
</center>
|
|
|
|
|
|
<br><br>
|
|
|
|
</body></html> |