To Lecture Notes

IT 238 -- Apr 6, 2026

Review Exercises

  1. What is the folder structure on the studentweb server for Project 0?
  2. What is a stub page?
  3. What is an entity? What are some common HTML entities that you know?
  4. List the JavaScript operators that you remember from IT 130.
  5. How you define a textfield that looks like this?
  6. What is the difference between these two HTML tags?
    <button id="btn1">Click Me</button>
    <input type="button" id="btn1" value="Click Me">
    
  7. Finish separating the source code for the BirthdayRiddle Example in the April 1 notes into .html, .css, and .js files.

What is JavaScript?

JavaScript Output

Functions

Projects 1a and 1b

Practice Problems

  1. Check the output of these statements:
    document.writeln("abc");
    document.writeln("def");
    
    Why are the outputs on the same line? I thought that writeln puts a newline character (\n) at the end of its output. Place these statements in this test script before viewing the HTML page:
    <html>
        <body>
            <script>
            // Copy JavaScript code to test here.
            </script>
        </body>
    </html>
    Answer: Just because the HTML code goes to a new line doesn't mean that the browser will display it on a new line. The \n character counts as whitespace that is eliminated by the browser. You need <br> to force the browser display to go to a new line:
    document.writeln("abc<br>");
    document.writeln("def");
    
  2. The HTML pages page1.html and page2.html are stored on the server in this directory structure:
                foldera 
               /   |   \
         folderb s.css page1.html
          /
    page2.html
    
    1. Add a link to page1.html with target page2.html. Show Page 2 in a new window.
    2. Add a link to page2.html with target page1.html. Show Page 1 in a new window.

    Test Script

    JavaScript Datatypes

    Control Structures

    Project 2a

    Truthiness

    Scope