+ 1
Is it possible to create a nav bar using pure JavaScript ?
How to create a nav bar like this : <div class="nav"> <a href="#home">Home</a> <a href="#news">News</a> <a href="#contact">Contact</a> <a href="#about">About</a> </div> By using pure JavaScript Only without the need of HTML?
2 ответов
+ 8
https://code.sololearn.com/WbOfKL1MD81L/?ref=app
Reference to refer and study:
https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement
https://developer.mozilla.org/en-US/docs/Web/API/Document/createTextNode
https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild
https://developer.mozilla.org/en-US/docs/Web/API/Element/className
+ 1
Calviղ , Wow ! Thank you so much ♥