Options for linking Javascript in an html page
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language = "JavaScript" type="text/JavaScript">
<!--
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" >
The body of our page (text, tables, pictures....) go here
</body>
</html>
var index = 1
function displayPicture()
{
var the_picture
if ( index <= 4 )
{
the_picture
= picts[index];
document.images["buttonOne"].src=
the_picture;
index
= index + 1
}
else index = 1
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD
HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>my title</title>
<script type="text/javascript"
language="javascript" src="myScript.js"></script>
<body>
html stuff goes here
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title>my title</title>
<script type="text/javascript" language="javascript"
src="myScript.js"> </script> -- make sure you
close your tag
<script language = "javascript" type="text/javascript">
<!--
... code here
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" >
The body of our page (text, tables, pictures....) go here
<script language = "javascript" type="text/javascript">
<!--
... code here
//-->
</script>
</body>
<script language = "javascript" type="text/javascript">
<!--
... code here
//-->
</script>
</html>