Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict'
- const USERS = [
- {
- id: 1,
- name:"karim",
- email: "karms@gmail.com"
- },
- {
- id: 2,
- name:"bob",
- email: "bob@gmail.com"
- },
- {
- id: 3,
- name:"akira",
- email: "akira@gmail.com"
- },
- ];
- function connect()
- {
- const name = document.getElementById('inputName');
- if(name.value == "")
- return;
- for(const user of USERS)
- if(name.value == user.name)
- {
- alert('vous êtes connectés !');
- location.replace('../../index.html');
- return;
- }
- alert('identifiant inconnu');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement