-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
30 lines (27 loc) · 703 Bytes
/
test.html
File metadata and controls
30 lines (27 loc) · 703 Bytes
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Mobile No. Validation</title>
<script type="text/javascript">
function validateMobNo(mobno){
var mobno2;
var flag=false;
var mlen= mobno.length;
//alert(mobno.substr(3,mobno.length-3));
if(mobno.charAt(0)!='+' && mlen==10){
mobno2="+91-"+mobno;
alert("your mobile wants to be "+mobno2);
flag=true;
}
else
alert("Please correct your mobile No");
}
</script>
</head>
<body>
<form name="mobvalidate">
<input type="text" id="mobno" />
<input type="button" value="VALIDATE" onclick="validateMobNo(mobno.value)" />
</form>
</body>
</html>