Code pieces

The following are small code pieces (or separate webpages) showcasing the functionality of different web technologies.

Javascript

To link a javascript file to a webpage, add the following between the head tags.

<script type="text/javascript" src="scriptFile.js"></script>

To ensure the javascript functionality is only executed once the page has loaded, place all function calls within a function set to the window.onload property:


window.onload = function() {
   /*Add code here*/
}

jQuery

For a demonstration of mouse event detection, see jQuery Mouse Events.

Bootstrap

For a demonstration of layouts using Bootstrap, see Bootstrap usage.

PHP

For a demonstration of a HTML form being processed with PHP, see PHP Contact Form.