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

Read more here: https://stackoverflow.com/questions/66266285/onclick-function-not-working-or-script-src-website-js-script-not-working

Content Attribution

This content was originally published by Areze at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: