K
korund
<html>
<head>
<title>Demo</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function init() {
alert('Message 1');
alert(''Message 2');
alert(''Message 3');
alert('text, etc');
var w = window.open('http://www.url.com');
}
window.onload = init;
</script>
</head>
<body>
</body>
</html>
that's just example.
I want use script as external file (script.js), and call it from html
page. Should I place reference to jscript in body tags, or place
reference in head tags?
<body>
<script src=script.js></script>
.....
<head>
<title>Demo</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function init() {
alert('Message 1');
alert(''Message 2');
alert(''Message 3');
alert('text, etc');
var w = window.open('http://www.url.com');
}
window.onload = init;
</script>
</head>
<body>
</body>
</html>
that's just example.
I want use script as external file (script.js), and call it from html
page. Should I place reference to jscript in body tags, or place
reference in head tags?
<body>
<script src=script.js></script>
.....