File tree Expand file tree Collapse file tree 4 files changed +94
-0
lines changed
Buttons/Button_to_email_field Expand file tree Collapse file tree 4 files changed +94
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 ">
6
+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge ">
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
8
+ < title > Document</ title >
9
+ < link rel ="stylesheet " href ="button_to_email_field.css ">
10
+ </ head >
11
+ < body class ="emailbutton ">
12
+ < div id ="button ">
13
+ < button id ="emailsub " onclick ="sub() "> < strong > Notify Me</ strong > </ button > </ div >
14
+ < script src ="button_to_email_field.js "> </ script >
15
+ </ body >
16
+ </ html >
Original file line number Diff line number Diff line change
1
+ function sub ( ) {
2
+ var input = document . createElement ( "input" ) ;
3
+ var button = document . getElementById ( "emailsub" ) ;
4
+ input . setAttribute ( "type" , "email" ) ;
5
+ input . setAttribute ( "id" , "input" ) ;
6
+ input . setAttribute ( "placeholder" , "Email" ) ;
7
+ var send = document . createElement ( "button" ) ;
8
+ send . setAttribute ( "id" , "send" ) ;
9
+ send . innerHTML = "send" ;
10
+ // document.getElementById("sub ").innerHTML = " ";
11
+ document . getElementById ( "button" ) . replaceChild ( input , button ) ;
12
+ document . getElementById ( "button" ) . appendChild ( send ) ;
13
+ }
Original file line number Diff line number Diff line change
1
+ .emailbutton {
2
+ background-color : rgb (130 231 255 );
3
+ }
4
+
5
+ # emailsub {
6
+ background-color : white;
7
+ color : rgb (30 , 196 , 238 );
8
+ padding : 15px ;
9
+ border : none;
10
+ border-radius : 50px ;
11
+ cursor : pointer;
12
+ width : 100% ;
13
+ transition : 1s ;
14
+ }
15
+
16
+ # input {
17
+ margin : 0px ;
18
+ padding : 10px ;
19
+ width : 100% ;
20
+ outline : none;
21
+ height : 30px ;
22
+ border-radius : 50px ;
23
+ color : black;
24
+ border : none;
25
+ background-color : white;
26
+ }
27
+
28
+ # send {
29
+ position : absolute;
30
+ border-radius : 18px ;
31
+ right : -15px ;
32
+ z-index : 2 ;
33
+ top : 5px ;
34
+ border : none;
35
+ width : 32% ;
36
+ padding : 12px ;
37
+ border : none;
38
+ cursor : pointer;
39
+ color : white;
40
+ background-color : skyblue;
41
+ box-shadow : -6px 5px 11px white inset;
42
+ transform : translateX (2px );
43
+ }
44
+
45
+ # button {
46
+ position : absolute;
47
+ top : 5px ;
48
+ border-radius : 5px ;
49
+ z-index : 2 ;
50
+ border : none;
51
+ cursor : pointer;
52
+ color : white;
53
+ }
Original file line number Diff line number Diff line change
1
+ # Button to Email field
2
+ <h3 > Tech Stack Used <img src = " https://media2.giphy.com/media/QssGEmpkyEOhBCb7e1/giphy.gif?cid=ecf05e47a0n3gi1bfqntqmob8g9aid1oyj2wr3ds3mg700bl&rid=giphy.gif " width = 32px > </h3 >
3
+ <p align =" left " > <a href =" https://www.w3.org/html/ " target =" _blank " > <img src =" https://img.icons8.com/color/48/000000/html-5--v1.png " /> <a href =" https://www.w3schools.com/css/ " target =" _blank " ><img src =" https://img.icons8.com/color/48/000000/css3.png " /></a >
4
+ <img src =" https://img.icons8.com/color/48/000000/javascript--v1.png " /></p >
5
+ <hr >
6
+
7
+ ### Preview
8
+
9
+ https://user-images.githubusercontent.com/89654310/150933376-f4f5fa37-654e-4a88-8e0d-0e4fb59b8eff.mp4
10
+
11
+
12
+
You can’t perform that action at this time.
0 commit comments