-
Notifications
You must be signed in to change notification settings - Fork 0
/
sccript2.js
114 lines (92 loc) · 3.71 KB
/
sccript2.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
function blink(a){
if(a.style.visibility == "visible")
{a.style.visibility = "hidden";}
else{a.style.visibility = "visible";}
}
setInterval('blink(vi)',3000);
setInterval('blink(name7)',500);
//valide
function valide(){
var name=document.getElementById('name');
var email=document.getElementById('email');
var dn=document.getElementById('dn');
var ln=document.getElementById('ln');
var vil=document.getElementById('ville');
var tel=document.getElementById('tel');
var ph=document.getElementById('file');
if(name.value==""||isNaN(name.value)==false){
document.getElementById('name1').innerHTML='Entrer votre <strong> Nom </strong>(seulement les lettres)!!';
document.getElementById('name').style.backgroundColor='wheat';
name.focus();
return false;
}
if(email.value==""){
document.getElementById('name2').innerHTML="Entrer votre <strong> L'email </strong>!!";
document.getElementById('email').style.backgroundColor='wheat';
email.focus();
return false;
}
if(dn.value==""){
document.getElementById('name3').innerHTML="Entrer votre <strong> Date de naissance </strong>!!";
document.getElementById('dn').style.backgroundColor='wheat';
dn.focus();
return false;
}
if(ln.value==""){
document.getElementById('name4').innerHTML="Entrer votre <strong> lieu de naissance </strong>!!";
document.getElementById('ln').style.backgroundColor='wheat';
ln.focus();
return false;
}
if(vil.value==""){
document.getElementById('name5').innerHTML="Entrer votre <strong> ville </strong>!!";
document.getElementById('ville').style.backgroundColor='wheat';
ville.focus();
return false;
}
if(tel.value=="+212 "){
document.getElementById('name6').innerHTML="Entrer votre <strong> Tel </strong>!!";
document.getElementById('tel').style.backgroundColor='wheat';
tel.focus();
return false;
}
if(ph.value==""){
document.getElementById('name7').innerHTML="Veuillez choisir votre simple <strong> photo </strong>!!";
document.getElementById('file').style.backgroundColor='wheat';
file.focus();
return false;
}
else{
return true;
}
}
function retourner(){
window.close("test.html");
window.open("inscription.html");
}
function visiblee(){
var name=document.getElementById('name');
var cy=document.getElementById('dn');
var ty=document.getElementById('ln');
var vi=document.getElementById('ville');
var tel=document.getElementById('tel');
var ph=document.getElementById('file');
if(name.value!=""&&isNaN(name.value)==true ){
name1.style.visibility = "hidden";
}
if(cy.value!=""){
name3.style.visibility = "hidden";
}
if(ty.value!="" ){
name4.style.visibility = "hidden";
}
if(vi.value!="" ){
name5.style.visibility = "hidden";
}
if(tel.value!="+212 "&&tel.value!="" ){
name6.style.visibility = "hidden";
}
if(ph.value!="" ){
name7.style.visibility = "hidden";
}
}