TAXES

TECHNOLOGY

SERVICES

CRYSTAL COMPUTER CONCEPTS

DELAWARE'S   ·      MIDDLETOWN  ·     ODESSA  ·    TOWNSEND AREA

This page has code written in case the browser does not have JavaScript functioning. There is a "noscript" tag, <noscript>.

The following will demonstrate the use of the indexOf() function to specify the position of a character
phrase, or word in a string. The position's place, more specifically its number, is returned.

If you see the three numbers and can read in the box's last line about the Hens, then your JavaScript is working.

<script type="text/javascript">
var str="Hello world!";
document.write(str.indexOf("d") + "<br />");
document.write(str.indexOf("WORLD") + "<br />");
document.write(str.indexOf("e"));
</script>

The following will demonstrate the use of the JavaScript special character /" to produce a quotation mark,
otherwise the string will be chopped and/or an error will be reported.

In JavaScript, a string is started and stopped with either single or double quotes.
Again, if you cannot read about the Hens after the script tag, then your JavaScript is not working.
<script type="text/javascript">
document.write ("<p>")
var txt="We are the so-called /"Hens/" from the east coast.";
document.write(txt);
document.write ("</p>")
</script>

Return to Table of Contents


DELAWARE'S MIDDLETOWN ODESSA AND TOWNSEND AREA