+ 2
How you can make that a variable = a DOM?
Please help me
4 Réponses
+ 3
you want the whole DOM? why? just use document.
If you want the anchors <a>, use (...)getElementByTagName('a') and assign that to a var. then you can loop it like an array
+ 1
The object "document" is the root of document or DOM. for example
document.body.innerHTML ="hola";
+ 1
I need a js variabl to setup a php variable.
0
Javascript also has document.getElementById('element-id-attr).
i.e.
var UsernameDOM = document.getelementById('usersname');
UsernameDOM.innerHTML ="The User's Name";