-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
73 lines (71 loc) · 1.8 KB
/
Copy pathscript.js
File metadata and controls
73 lines (71 loc) · 1.8 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
function validateForm() {
let x = document.getElementById("name").value;
let y = document.getElementById("email").value;
let at = y.indexOf("@");
if (x == "") {
alert("Please fill in your name");
return false;
}
if (y == "") {
alert("Please mention your email");
return false;
}
if (at < 1) {
alert("Invalid email address");
return false;
}
if((at+1) == "")
{
alert("Invalid email address");
}
alert("Thanks for contacting");
return true;
}
function expand1()
{
let x=document.createElement('iframe');
x.setAttribute('height',"500");
x.setAttribute('width',"600");
x.setAttribute('frameborder',"0");
x.setAttribute('src',"https://karanpreet710.github.io/Mario-Club-Website/");
let y=document.getElementById("l1");
let a=y.children[1];
a.remove();
let z=document.createElement("button");
z.innerHTML="Click to close";
let w=document.createElement("br");
y.appendChild(z);
y.appendChild(w);
y.appendChild(x);
z.onclick=function()
{
z.remove();
w.remove();
x.remove();
y.appendChild(a);
}
}
function expand2()
{
let x=document.createElement('iframe');
x.setAttribute('height',"500");
x.setAttribute('width',"600");
x.setAttribute('frameborder',"0");
x.setAttribute('src',"https://karanpreet710.github.io/Registration_Form/");
let y=document.getElementById("l2");
let a=y.children[1];
a.remove();
let z=document.createElement("button");
z.innerHTML="Click to close";
let w=document.createElement("br");
y.appendChild(z);
y.appendChild(w);
y.appendChild(x);
z.onclick=function()
{
z.remove();
w.remove();
x.remove();
y.appendChild(a);
}
}