Forum Moderators: open
second question what if you have one external js
and other part of js in body as needed how is it than the correct way to use the jaavscript in the bodytag
<script type="text/javscript">
function ... blablabla
</script>
and
<script type="text/javscript" src="js/externaljs.js">
</script>
third question in this case was the js written before the xhtml era and it uses the
language="JavaScript1.2" attribute >>>>>>>>>>>
should I leave it out then?
Since you're going to be transmitting this as text/html, most likely, omitting the </script> will leave your document with an unclosed <script> because HTML does not understand what <script /> means.
(No, there is no way [hixie.ch] for the browser to detect XHTML when sent with an HTML MIME type.)
-->
<script type="text/javascript">
<![CDATA[
/* You need to mark this as a CDATA section [w3.org] */
]]>
</script>
</head>
<body>
<p>This is valid XHTML1.0. (No, you do not need the xml prolog or DOCTYPE per Appendix C.)</p>
<p>Note that you may not use document.write() in an XHTML document. You must manipulate the document via the DOM.</p>
</body>
</html>