onclick function not working Or <script src="website.js> <script> not working

I have the following code:

And have alot of code in my js fi

<script href="answer.js"></script> 

le so I won’t show you that code which does a certain function I need on my website , to make sure I haven’t made an error in the javascript itself I used the alert() function and it showed no response, subsequently, I tried looking on the internet for comfirmation and was greeted with the same snippet then I tried directly putting all of my js code into my script tag but failed again, can anyone help? If you need all of the html here it is

         <script href="answer.js"></script>                                             
</head> i have a body tag and doctype html and <html> tag but there is no need to show it

9 thoughts on “onclick function not working Or <script src="website.js> <script> not working”

Leave a Comment