mercredi 18 juillet 2018

how to call javascript via if else statement

how to call javascript via if else statement

if (localStorage.getItem('lang')=='zh'){
    //run  javascript prepared for Chinese (not a function but whole javascript file)
}
else {
    //run another javascript file prepared for English
}

Aucun commentaire:

Enregistrer un commentaire