|
6 | 6 | <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7 | 7 | <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8 | 8 | <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"> |
63 | 10 | </head>
|
64 |
| - |
65 | 11 | <body>
|
66 | 12 | <div id="button">
|
67 | 13 | <button id="emailsub" onclick="sub()"><strong>Notify Me</strong></button></div>
|
| 14 | + <script src="button_to_email_field.js"></script> |
68 | 15 | </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 |
| - |
86 | 16 | </html>
|
0 commit comments