我有以下脚本:我希望我的应用程序能够访问并记住此页面的第二次启动:这是我尝试过的方法,但它不起作用。
<script>
if (localStorage.getItem("0") === null) {
//do nothing
}
else if(localStorage.getItem("1")===null{
}
else if(localStorage.getItem("2")===null{
}
else if(localStorage.getItem("3")===null{
}
else if(localStorage.getItem("0") !==null){
window.location = "cosmote.html"
}
else if(localStorage.getItem("1") !==null){
window.location = "germanos.html"
}
else if(localStorage.getItem("2") !==null){
window.location = "zapp.html"
}
else if(localStorage.getItem("3") !==null){
window.location = "sunlight.html"
}
</script>