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?
- <!DOCTYPE html>
- <html>
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
- function addunderline()
- {
- head1.style.textDecoration = "underline"
- }
- function removeunderline()
- {
- head1.style.textDecoration = "none"
- }
- function addoverline()
- {
- head1.style.textDecoration = "overline"
- }
-
- </script>
- <meta charset=utf-8 />
- <title>TEST4</title>
- </head>
- <body>
- <h1 id="head1" onMouseover="addunderline()" onMouseout="removeunderline()" onClick="addoverline()">Welcome to this page!</h1>
- <label for="example">maxlength="10"</label>
- <input type="textbox" id="example" maxlength="10"/>
- </body>
- </html>