Src file inclusion seems to cause functions not to run

Src file inclusion seems to cause functions not to run

When I keep the src=xxx in the file, the text changes do not work. BUT when I remove it, so the <script src=...> is just <script>, the mouseover, etc., are correctly handled.

When I have this file reference in another html file, it works just fine. So, it seems not to be the reference to the file. But if it's not that, then what?

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
  5. function addunderline()
  6. {
  7.     head1.style.textDecoration = "underline"
  8. }

  9. function removeunderline()
  10. {
  11.     head1.style.textDecoration = "none"
  12. }

  13. function addoverline()
  14. {
  15.     head1.style.textDecoration = "overline"
  16. }
  17.  
  18. </script>
  19. <meta charset=utf-8 />
  20. <title>TEST4</title>
  21. </head>
  22. <body>
  23. <h1 id="head1" onMouseover="addunderline()" onMouseout="removeunderline()" onClick="addoverline()">Welcome to this page!</h1>
  24.   <label for="example">maxlength="10"</label>
  25.   <input type="textbox" id="example" maxlength="10"/>
  26. </body>
  27. </html>