
October 1st, 2001, 04:47 PM
|
|
Senior Citizen
|
|
Join Date: Jan 2001
Location: leftcoast
Posts: 2,019
Time spent in forums: < 1 sec
Reputation Power: 15
|
|
HTML event handlers (onClick,onMouseover, etc.) are JavaScript (so, of course, is the javascript : url) and are found in the <body> of the document. You can reference functions in them, but also embed the JS right in the HTML.
You can also do this:
<body>
<table>
...... etc.
</table>
<div>content</div>
<script language="JavaScript" type="text/javascript" src=" myScript.js">
<.... more markup...
where myScript.js is an external JavaScript file with nothing but JS in it. It will be written into the HTML stream right where it appears, as if it was hardcoded there. More...
|