This is the sample code:
var users = ["ownersName","Others"];
var name=prompt("Enter your name");
if(name==users[0]){
w
alert("Hey"+' '+name)
alert("You have been granted the webMaster Role!")
}
else{
console.log("hello user");
}
I want to allow the user to view the page only if his name satisfies 'ownersName'.
Aucun commentaire:
Enregistrer un commentaire