-
Notifications
You must be signed in to change notification settings - Fork 2
/
script.js
45 lines (41 loc) · 1.32 KB
/
script.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
// Home Section
function validate()
{
if( document.getElementById("t1").value== "" )
{
alert( "Please provide your name!" );
document.getElementById("t1").focus() ;
return false;
}
if( document.getElementById("t2").value == "" )
{
alert( "Please provide your Email!" );
document.getElementById("t2").focus() ;
return false;
}
if( document.getElementById("t5").value == "" )
{
alert( "Please provide your Mobile number" );
document.getElementById("t5").focus() ;
return false;
}
if(isNaN(document.getElementById("t5").value ))
{
alert( "It's not a valid number" );
document.getElementById("t5").focus() ;
return false;
}
if( document.getElementById("t5").value.length<10 )
{
alert( "Please provide valid Mobile number" );
document.getElementById("t5").focus() ;
return false;
}
if( document.getElementById("t7").value== "" )
{
alert( "Please provide your message!" );
document.getElementById("t7").focus() ;
return false;
}
return( true );
}