With Javascript you put them into a webpage, inside the HTML:

Code:
<html>
 <head>
  <title>asdf</title>
  <script language="Javascript" src="filename.js"></script>
 </head>
 <body>
  <p>Webpage body</p>
 </body>
</html>
So, you need to be the author of the webpage.

Most people just get annoyed with Javascript "special effects" on webpages though, by the way.