Uncaught TypeError: document.getElementsById is not a functi
Résolu/Fermé
flexi2202
Messages postés
3803
Date d'inscription
lundi 14 mars 2011
Statut
Membre
Dernière intervention
1 février 2025
-
Modifié le 15 août 2022 à 00:21
flexi2202 Messages postés 3803 Date d'inscription lundi 14 mars 2011 Statut Membre Dernière intervention 1 février 2025 - 15 août 2022 à 01:02
flexi2202 Messages postés 3803 Date d'inscription lundi 14 mars 2011 Statut Membre Dernière intervention 1 février 2025 - 15 août 2022 à 01:02
A voir également:
- Getelementsbyid
- Uncaught syntaxerror: expected expression, got '<' ✓ - Forum Javascript
- Uncaught mysqli_sql_exception: incorrect integer value: ✓ - Forum MySQL
- Uncaught typeerror: cannot read properties of null (reading 'classlist') ✓ - Forum Javascript
- Uncaught typeerror: cannot read properties of null (reading 'addeventlistener') ✓ - Forum Javascript
- Typeerror: list.append() takes no keyword arguments - Forum Python
1 réponse
flexi2202
Messages postés
3803
Date d'inscription
lundi 14 mars 2011
Statut
Membre
Dernière intervention
1 février 2025
187
15 août 2022 à 01:02
15 août 2022 à 01:02
voici le problème je devais mettre ceci document.getElementById au lieu de
document.getElementByID
source
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");