-
Notifications
You must be signed in to change notification settings - Fork 1
/
check.html
69 lines (66 loc) · 1.39 KB
/
check.html
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
<!DOCTYPE html>
<html>
<head>
<title>email nd phone no. check</title>
<style>
body
{
margin: 100px;
background-color: #BEEFF9;
text-align: center;
}
</style>
<img class="logo" src="https://i.ibb.co/G25qN6X/logo1.jpg">
<script type="text/javascript">
function email()
{
var name=document.getElementById("name").value;
var t = name.endsWith("@gmail.com");
var p = name.endsWith("@outlook.com");
var h = name.endsWith("@yahoo.com");
if(t == true|p == true|h == true)
alert("Valid email id ");
else
alert("Invalid email id Enter a valid Email id");
}
function phone()
{
var no=document.getElementById("nt").value;
var a= parseInt(no);
var i=0;
while(a >> 0)
{
a /= 10;
i = i+1;
}
if(i===10)
alert("Valid phone no. ");
else
alert("Invalid phone no. Enter a valid Phone number");
}
</script>
</head>
<body>
<h2>
<u>Log In</u>
</h2>
<br>
Email id :
<input type="text" id="name">
<button onclick="email()">Submit</button>
<br>
<br>
<br>
<div style="margin-left: 40px"></div>
<br>
<br>
Ph no. :
<input type="name" id="nt">
<button onclick="phone()">Submit</button>
<br>
<br>
<a href="C:\Users\LAKSHMANA RAO\Desktop\techbitepage1.html" class="btn login">Log in</a>
<h2>Latest Technology updates will be mailed!!:)</h2>
<script src="C:\Users\Sai_HelloWorld\Desktop\check.js" ></script>
</body>
</html>