File tree Expand file tree Collapse file tree 3 files changed +11
-25
lines changed
Week2/homework/Masoud/tempConverter Expand file tree Collapse file tree 3 files changed +11
-25
lines changed Original file line number Diff line number Diff line change 1
- const celciusInput = document . querySelector ( '# celcius > input ') ;
2
- const fahrenheitInput = document . querySelector ( '# fahrenheit > input ') ;
3
- const kelvinInput = document . querySelector ( '# kelvin > input ') ;
1
+ const celciusInput = document . getElementById ( ' celcius') ;
2
+ const fahrenheitInput = document . getElementById ( ' fahrenheit') ;
3
+ const kelvinInput = document . getElementById ( ' kelvin') ;
4
4
5
5
celciusInput . addEventListener ( 'input' , function ( ) {
6
6
const cTemp = parseFloat ( celciusInput . value ) ;
Original file line number Diff line number Diff line change 10
10
href ="favicon.ico ">
11
11
</ head >
12
12
< body >
13
- < div id ="celcius ">
14
- < input type ="number " placeholder ="celcius... ">
13
+ < div class ="celcius ">
14
+ < input id =" celcius " type ="number " placeholder ="celcius... ">
15
15
</ div >
16
16
17
- < div id ="fahrenheit ">
18
- < input type ="number " placeholder ="fahrenheit... ">
17
+ < div class ="fahrenheit ">
18
+ < input id =" fahrenheit " type ="number " placeholder ="fahrenheit... ">
19
19
</ div >
20
20
21
- < div id ="kelvin ">
22
- < input type ="number " placeholder ="kelvin... ">
21
+ < div class ="kelvin ">
22
+ < input id =" kelvin " type ="number " placeholder ="kelvin... ">
23
23
</ div >
24
24
25
25
< script src ="app.js "> </ script >
Original file line number Diff line number Diff line change 12
12
height : 33.33vh ;
13
13
}
14
14
15
- # fahrenheit {
15
+ . fahrenheit {
16
16
border-bottom : 3px solid white;
17
17
border-top : 3px solid white;
18
18
}
@@ -30,18 +30,4 @@ input[type='number'] {
30
30
31
31
::-webkit-input-placeholder {
32
32
color : grey;
33
- }
34
-
35
- ::-moz-placeholder {
36
- color : grey;
37
- }
38
-
39
- ::-ms-input-placeholder {
40
- color : grey;
41
- }
42
-
43
- input [type = 'number' ]::-webkit-inner-spin-button ,
44
- input [type = 'number' ]::-webkit-outer-spin-button {
45
- -webkit-appearance : none;
46
- margin : 0 ;
47
- }
33
+ }
You can’t perform that action at this time.
0 commit comments