How to fix: Uncaught TypeError document.getElementbyId is not a function
If you have ever experienced the following error message using getElementById
:
Uncaught TypeError document.getElementbyid is not a function
You will be glad to know that the fix is trivial. Pay attention to any lowercase letters in the method name. JavaScript is case-sensitive so the b
and the start of every other word after get
should be capitalized.
Correct use looks like the following:
document.getElementById("testUrl");