代码拉取完成,页面将自动刷新
<!doctype html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=10" />
<title>标题</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
</head>
<script type="text/javascript">
var UserData = {
userData: null,
name: location.hostname,
//this.name = "css88.com";
init: function() {
if (!UserData.userData) {
try {
UserData.userData = document.createElement('INPUT');
UserData.userData.type = "hidden";
UserData.userData.style.display = "none";
UserData.userData.addBehavior("#default#userData");
document.body.appendChild(UserData.userData);
var expires = new Date();
expires.setDate(expires.getDate() + 365);
UserData.userData.expires = expires.toUTCString();
} catch (e) {
return false;
}
}
return true;
},
setItem: function(key, value) {
if (UserData.init()) {
UserData.userData.load(UserData.name);
UserData.userData.setAttribute(key, value);
UserData.userData.save(UserData.name);
}
},
getItem: function(key) {
if (UserData.init()) {
UserData.userData.load(UserData.name);
return UserData.userData.getAttribute(key)
}
},
remove: function(key) {
if (UserData.init()) {
UserData.userData.load(UserData.name);
UserData.userData.removeAttribute(key);
UserData.userData.save(UserData.name);
}
}
};
</script>
<body>
<script type="text/javascript">
UserData.setItem("dd","sdfsd");
alert(UserData.getItem("dd"));
</script>
</body>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。