?????????????
???????????? ???????[ 2015/8/10 13:51:54 ] ??????????????????? ?????
</head>
<script src="web2.js"></script>
<body>
<table>
<tr><td>??????</td><td><input type="text" id="name" /></td></tr>
<tr><td>Email??</td><td><input type="text" id="email" /></td></tr>
<tr><td>?綽????</td><td><input type="text" id="tel" /></td></tr>
<tr><td>?????</td><td><input type="text" id="memo" /></td></tr>
<tr>
<td></td>
<td><input type="button" value="????" onclick="saveStorage()" /></td>
</tr>
</table>
<hr>
<p>??????
<input type="text" id="find" />
<input type="button" value="????" onclick="loadStorage('msg')" />
</p>
<p id="msg"></p>
</body>
</html>
function saveStorage(id){
var data=new Object;
data.name=document.getElementById("name").value;
data.email=document.getElementById("email").value;
data.tel=document.getElementById("tel").value;
data.memo=document.getElementById("memo").value;
var str=JSON.stringify(data);
localStorage.setItem(data.name??str);
alert("?????????");
}
function loadStorage(id){
var find= document.getElementById('find').value;
var str= localStorage.getItem(find);
var data=JSON.parse(str);
var result="??????"+data.name+"<br>";
result+="??????"+data.email+"<br>";
result+="??????"+data.tel+"<br>";
result+="??????"+data.memo+"<br>";
var target=document.getElementById(id);
target.innerHTML=result;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11