tags:

views:

61

answers:

2

What's it called when you declare javascript in the <head>? It's not external, and it's not inline...it's called something else. What is it?

<html>
<head>
<script type="text/javascript">
function message()
{
alert("This alert box was called with the onload event");
}
</script>
</head>

<body onload="message()">
</body>
</html>

edit: google helped me find the word i was looking for - internal. i saw it used in the context of external/internal/inline css. is internal javascript an appropriate term?

+2  A: 

It is inline JavaScript, it's just inline in the head, rather than inline in the body.

Skilldrick
+2  A: 

Inline is any javascript that's literally embedded in a page, whether it's in the head or body. If it's in an external file you include via <script src="..."><script>, then it's not inline anymore.

Marc B