{article JavaScript Table of Content}{title} {text} {/article}
- 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;">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><br>
<head><br>
<title>title</title><br>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br>
<meta name="description" content="" /><br>
<meta name="keywords" content="" /><br>
<meta name="robots" content="index,follow" /><br>
<link rel="stylesheet" type="text/css" href="styles.css" /><br>
</head><br>
<br>
<body><br>
<script language="javascript"<br>
type="text/javascript" <br>
src="external.js"><br>
</script><br>
</body><br>
</html><br>
</pre>
<script language="javascript" type="text/javascript">
// You can place JavaScript like this
</script>
<?php
// You can place PHP like this
?>
{/source}
- 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!