{article JavaScript Table of Content}{title} {text} {/article}

  1. Create a new HTML document and save it

external.html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="robots" content="index,follow" />
<link rel="stylesheet" type="text/css" href="/styles.css" />
</head>

<body>
<script language="javascript"
type="text/javascript"
src="/external.js">
</script>
</body>
</html>

{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">

&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br>
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;<br>
&lt;head&gt;<br>
    &lt;title&gt;title&lt;/title&gt;<br>
    &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br>
    &lt;meta name=&quot;description&quot; content=&quot;&quot; /&gt;<br>
    &lt;meta name=&quot;keywords&quot; content=&quot;&quot; /&gt;<br>
    &lt;meta name=&quot;robots&quot; content=&quot;index,follow&quot; /&gt;<br>
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;styles.css&quot; /&gt;<br>
&lt;/head&gt;<br>
<br>
&lt;body&gt;<br>
    &lt;script language=&quot;javascript&quot;<br>
                    type=&quot;text/javascript&quot; <br>
                    src=&quot;external.js&quot;&gt;<br>
        &lt;/script&gt;<br>
&lt;/body&gt;<br>
&lt;/html&gt;<br>

</pre>



<script language="javascript" type="text/javascript">
    // You can place JavaScript like this

</script>
<?php
    // You can place PHP like this

?>
{/source}

  1. Create a new external javascript document and save it

external.js

document.write("Hello World attached Javascript file!<br/>");

{source}
<!-- You can place html anywhere within the source tags -->
<pre class="brush:py;">

document.write("Hello World attached Javascript file!<br/>");

</pre>

<script language="javascript" type="text/javascript">
    // You can place JavaScript like this

</script>
<?php
    // You can place PHP like this

?>
{/source}

Following is the output when the whole code listing is run:

Hello World attached Javascript file!