What's it called when you declare javascript in the <head>
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&开发者_JAVA百科gt;
</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?
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.
It is inline JavaScript, it's just inline in the head, rather than inline in the body.
精彩评论