R
Rafal 'Raf256' Maj
What is the correct way of put javascript code in XHTML 1 document, in
1) head
2) body
1) head
2) body
Rafal said:What is the correct way of put javascript code in XHTML 1 document, in
1) head
2) body
Rafal said:What is the correct way of put javascript code in XHTML 1 document, in
1) head
2) body
What is the correct way of put javascript code in XHTML 1 document, in
1) head
2) body
Louis said:I prefer the head because non-supporting browsers are less likely to print
the script on the users screen. If you choose to put it in the body
remember to use the <!-- comments, so non-supporting browsers won't
display the code.
I prefer the head because non-supporting browsers are less likely to
print the script on the users screen. If you choose to put it in the
body remember to use the <!-- comments, so non-supporting browsers
won't display the code.
No, like:Rafal said:(e-mail address removed)
Thanks, and - how exacly looks sample JS code in XHTML?
<!DOCTYPE ...>
<html>
<head> ...
<script language="javascript 1.1">
here_some_js_code
</script>
</head>
<body>
...
?
Louis Somers said:I prefer the head because non-supporting browsers are less likely to print
the script on the users screen. If you choose to put it in the body
remember to use the <!-- comments, so non-supporting browsers won't
display the code.
Rafal 'Raf256' Maj said:(e-mail address removed)
Thanks, and - how exacly looks sample JS code in XHTML?
<script language="javascript 1.1">
here_some_js_code
</script>
rf said:The only non-javascript that does not simply ignore the entire <script>
element (as it should) was a IIRC certain release of Netscape 3 which only
lasted for a few months anyway. The use of HTML comments inside a <script>
element has been cargo cult from then on
While the city slept said:What is the correct way of put javascript code in XHTML 1 document, in
1) head
2) body
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.