File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
2
2
// document.querySelector() is used to select an element from the document using its ID
3
- let captchaText = document . querySelector ( '# captcha') ;
3
+ let captchaText = document . getElementById ( ' captcha') ;
4
4
var ctx = captchaText . getContext ( "2d" ) ;
5
5
ctx . font = "30px Roboto" ;
6
6
ctx . fillStyle = "#08e5ff" ;
7
7
8
8
9
- let userText = document . querySelector ( '# textBox') ;
10
- let submitButton = document . querySelector ( '# submitButton') ;
11
- let output = document . querySelector ( '# output') ;
12
- let refreshButton = document . querySelector ( '# refreshButton') ;
9
+ let userText = document . getElementById ( ' textBox') ;
10
+ let submitButton = document . getElementById ( ' submitButton') ;
11
+ let output = document . getElementById ( ' output') ;
12
+ let refreshButton = document . getElementById ( ' refreshButton') ;
13
13
14
14
15
15
// alphaNums contains the characters with which you want to create the CAPTCHA
You can’t perform that action at this time.
0 commit comments