first load or not

//first launch distinguish
function launchPic() {
    // localStorage.clear();
    //first
    if (localStorage.getItem('firstLaunch')=='hasValue') {
        console.log('yes');
    }
    else {
        console.log('no');
        $('#guide').css('display', 'block');
        localStorage.setItem('firstLaunch', 'hasValue');
    }
}

 

posted on 2017-11-21 17:48  鸣动我心  阅读(130)  评论(0编辑  收藏  举报