利用localStorage判断程序首次运行
<script type="text/javascript"> if (localStorage.pagecount) { localStorage.pagecount=Number(localStorage.pagecount) +1; } else { localStorage.pagecount=1; } if (localStorage.pagecount == 1) { window.location.href="home.html"; //引导页页面
} else { window.location.href="home.html"; //首页 } </script>