Skip to content
Advertisement

how to change `href` in `link` by javascript

I would like to change target on link tag with my css. I would like to do this with javascript. It should be when I click on button. I have html file

JavaScript

I have javascript file

JavaScript

Advertisement

Answer

Your approach is incorrect, or not practical. What you need to do is to load CSS for both themes and change the body theme data or class.

JavaScript

in JS

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement