-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsignup.js
More file actions
55 lines (51 loc) · 1.11 KB
/
Copy pathsignup.js
File metadata and controls
55 lines (51 loc) · 1.11 KB
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
function validates()
{
var id = document.getElementById("userid");
var p = document.getElementById("pass");
var ph = document.getElementById("phn");
var e = document.getElementById("emailid");
if (id.value == "")
{
window.alert("Enter your UserId !! ");
id.style.background='Red';
id.focus();
return false;
}
if(id.value != "")
{
id.style.background="White";
}
if ( p.value == "")
{
window.alert("Enter the password !! ");
p.style.background="Red";
p.focus();
return false;
}
if(p.value != "")
{
p.style.background="White";
}
if ( e.value == "")
{
window.alert("Enter the email ID !! ");
e.style.background="Red";
e.focus();
return false;
}
if(e.value != "")
{
e.style.background="White";
}
if ( ph.value == "")
{
window.alert("Enter the Phone no. !! ");
ph.style.background="Red";
ph.focus();
return false;
}
if(ph.value != "")
{
ph.style.background="White";
}
}