本地缓存
var strKey = "strKey";
var storage = window.localStorage;
function onStart(){
if(storage.getItem(strKey)!=null){
alert(storage.getItem(strKey)+'localStorage');
}else if(Cookie.read(strKey)!=null){
alert(Cookie.read(strKey)+'cookie');
}
}
function bendihuancun(){
var strValue = document.getElementById("username").value;
if (storage) {
storage.setItem(strKey, strValue);
} else {
Cookie.write(strKey, strValue);
}
}