<script src="<?= $BASENAME ?>/lib/global/js/prettify/lang-css.js" type="text/javascript"></script>
<script src="<?= $BASENAME ?>/lib/global/js/prettify/lang-js.js" type="text/javascript"></script>
<p>Below is one possible solution to this problem.</p>
<h3>Exercise 1: Use the Firebug JavaScript Console</h3>
<p>Following is a sample session copied from the JavaScript console of Firebug:</p>
<style type="text/css">
dl.firebug {
margin: 0;
padding: 0;
background-color: white;
font-size: 80%;
max-width: 600px;
}
dl.firebug,
dl.firebug dt,
dl.firebug dd,
dl.firebug samp,
dl.firebug kbd {
font-family: 'Droid Sans Mono', monospace;
}
dl.firebug dt,
dl.firebug dd {
margin: 0;
padding: 0;
border-top: solid 1px lightgray;
}
dl.firebug dt:first-child {
border-top: none;
}
dl.firebug dt {
color: blue;
}
dl.firebug samp {
background-color: inherit;
}
dl.firebug samp.undefined {
font-family: 'Droid Sans', sans-serif;
font-style: italic;
color: gray;
}
dl.firebug samp.string {
color: red;
}
dl.firebug samp.number {
color: red;
}
</style>
<?= load(dirname(__FILE__) . "/solution/firebug.html") ?>
<header>
<h3>Exercise 2: Attach JavaScript to a Web Page</h3>
<div class="workinglink"><a href="solution/minilab4.html">working example</a></div>
</header>
<h4>minilab4.html:</h4>
<pre class="prettyprint lang-html linenums"><?= escape(load(dirname(__FILE__) . "/solution/minilab4.html")) ?></pre>
<h4>minilab4.js:</h4>
<pre class="prettyprint lang-js linenums"><?= escape(load(dirname(__FILE__) . "/solution/minilab4.js")) ?></pre>