document.getElementById("myproject-2").onclick=functio{
location.href="https://aruneet-11.github.io/drumKit/";
}
used this code to go to that link when we click on the button but it’s not redirceting to the page.Nothing happens when I click on the button and I have included the script file before the closing body tag.
I am expecting whenever I click on the button then It will open that link.
2
Answers
There are some syntax errors in your code
Try the following
Please correct your syntax after
onclick=
addfunction()
and then continue with {It will solve your problem.