Skip to content

Commit 0f42ac4

Browse files
authored
Update button_to_email_field.html
1 parent 65d8b19 commit 0f42ac4

File tree

1 file changed

+2
-72
lines changed

1 file changed

+2
-72
lines changed

button_to_email_field.html

Lines changed: 2 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -6,81 +6,11 @@
66
<meta http-equiv="X-UA-Compatible" content="IE=edge">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0">
88
<title>Document</title>
9-
<style>
10-
body {
11-
background-color: rgb(130 231 255);
12-
}
13-
14-
#emailsub {
15-
background-color: white;
16-
color: rgb(30, 196, 238);
17-
padding: 15px;
18-
border: none;
19-
border-radius: 50px;
20-
cursor: pointer;
21-
width: 100%;
22-
transition: 1s;
23-
}
24-
25-
#input {
26-
margin: 0px;
27-
padding: 10px;
28-
width: 100%;
29-
outline: none;
30-
height: 30px;
31-
border-radius: 50px;
32-
color: black;
33-
border: none;
34-
background-color: white;
35-
}
36-
37-
#send {
38-
position: absolute;
39-
border-radius: 18px;
40-
right: -15px;
41-
z-index: 2;
42-
top: 5px;
43-
border: none;
44-
width: 32%;
45-
padding: 12px;
46-
border: none;
47-
cursor: pointer;
48-
color: white;
49-
background-color: skyblue;
50-
box-shadow: -6px 5px 11px white inset;
51-
transform: translateX(2px);
52-
}
53-
#button {
54-
position: absolute;
55-
top: 5px;
56-
border-radius: 5px;
57-
z-index: 2;
58-
border: none;
59-
cursor: pointer;
60-
color: white;
61-
}
62-
</style>
9+
<link rel="stylesheet" href="button_to_email_field.css">
6310
</head>
64-
6511
<body>
6612
<div id="button">
6713
<button id="emailsub" onclick="sub()"><strong>Notify Me</strong></button></div>
14+
<script src="button_to_email_field.js"></script>
6815
</body>
69-
<script>
70-
function sub() {
71-
var input = document.createElement("input");
72-
var button = document.getElementById("emailsub");
73-
input.setAttribute("type", "email");
74-
input.setAttribute("id", "input");
75-
input.setAttribute("placeholder", "Email");
76-
var send = document.createElement("button");
77-
send.setAttribute("id", "send");
78-
send.innerHTML = "send";
79-
// document.getElementById("sub ").innerHTML = " ";
80-
document.getElementById("button").replaceChild(input, button);
81-
document.getElementById("button").appendChild(send);
82-
83-
}
84-
</script>
85-
8616
</html>

0 commit comments

Comments
 (0)