html5 web 存储/存取
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<body>
<div>
<div style="margin: 15px;">
<button onClick="gogoset()">存</button>
</div>
<div style="margin: 15px;">
<button onClick="gogoget()">取</button>
</div>
</div>
</body>
<script type="text/javascript">
function gogoset() {
localStorage.setItem("gogophone", "123456");
console.log('00000000 111 存入setItem');
}
function gogoget() {
localStorage.getItem("gogophone");
console.log('00000000 111 取出getItem', localStorage.getItem("gogophone"));
}
</script>
</html>