Prof. Conrad's CISC103 Cheat Sheet

As you know, I permit students one sheet of note when taking exams. Here are the things that I myself have trouble remembering and so would be on my cheat sheet.

This does not mean these things are more important.

These are just the things that I find, in working with JavaScript, that I forget how to do.

Special Characters

String.fromCharCode(250); // ú decimal unicode 250
String.fromCharCode(0x2714); // heavy check mark, hex unicode 2714

How to Call a function repeatedly (e.g. once per second)

function startTimer()
{
window.setInterval("updateTime()",1000); // updateTime() will get called every 1000 ms
}

function updateTime( { // do your stuff in here } ... <body onload="startTimer();"> ...

The required attributes for a <form> open tag

    <form id="schedInfo" action="">

Some useful elements for a form

a single line text field<input type="text" size="20" name="theName" />
a multi-line text field <textarea rows="10" cols="30" name="theText" style="background-color: #FFCCCC;"> Initial value goes here </textarea>