What i want is ,when i click on navigation , i want that navigation'c background to be changed
I'm not sure I understand fully, do you mean that when a navigation link is clicked you expect the link to the current page to have a specific background color? If so, that's do-able but it depends on what you're using to serve the pages. If it's server-side rendering (ie. Spring, ASP.NET, Django, PHP) then you probably need to add a flag in the server-side which you pass into the page model which will then set a class on the links. If it's client-side rendering (ie. Angular, React, Vue) and you're using JS routing then I think each of these frameworks have their own attributes/processors (ie. Angular has
routerLinkActive[^])
I'm not seeing any evidence of using a framework though, these look like static HTML pages with some Javascript so I can't really suggest anything.
for some reason i am still at home and navigation link is not working.Example after clicking on navigation,i am still on home page http://127.0.0.1:5500/index.html What i want is http://127.0.0.1:5500/nav/technology.html
This one's quite easy to diagnose, you're cancelling the navigation in your Javascript:
items.addEventListener("click", function (e) {
e.preventDefault()
What you're saying here is "when someone clicks a link, cancel navigating to that link" so obviously your page won't navigate to whatever address you've provided.