-
Notifications
You must be signed in to change notification settings - Fork 4
/
book-code.js
40 lines (37 loc) · 1.09 KB
/
book-code.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
window.addEventListener('load' , () => {
const params = (new URL(document.location)).searchParams;
const nprop = params.get('name');
if (nprop != ''){
document.getElementById('prop').value = nprop;
}
})
function frmsbm(){
num_val = document.getElementById('num').value
if (document.getElementById('email').value.includes('@')){
if (document.getElementById('email').value.includes('.')){
if (num_val.length == 10){
if(num_val.slice(0, 1) >= 7 && num_val.slice(0, 1) <=9 ){
if(isNaN(num_val)){
alert('Mobile Number is incorrect');
}
else{
document.getElementById('subm').style['display'] = 'block';
document.getElementById('frm').style['display'] = 'none';
}
}
else{
alert('Mobile Number is incorrect');
}
}
else{
alert('Mobile Number is incorrect');
}
}
else{
alert('Email Address is incorrect');
}
}
else{
alert('Email Address is incorrect');
}
}