Skip to content

Commit cd0df58

Browse files
committed
replaced document.queryselector with document.getElementById
1 parent f5d77f1 commit cd0df58

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

script.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11

22
// 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');
44
var ctx = captchaText.getContext("2d");
55
ctx.font = "30px Roboto";
66
ctx.fillStyle = "#08e5ff";
77

88

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');
1313

1414

1515
// alphaNums contains the characters with which you want to create the CAPTCHA

0 commit comments

Comments
 (0)