The approach being used is to hide the textarea and create a div that is editable (add the attribute contenteditable="true"
to a div. I'm not too sure of browser compatibility). On every key press the javascript grabs all the content, locates mis-spelled words and puts a span around the offending word. Using css they put a squiggle red underline under the word (an image of a small segment of red squiggle)
Thinking about it, they would need to keep track of the location of the cursor in the div in case the user starts entering text in the middle of the box, so that after altering the contents the script returns the cursor to the correct position and not at the end of the block of content.
Also, you would need to update the value of the textarea on each keypress.
[edit]
Here is a jsFiddle of proof of concept:
http://jsfiddle.net/tEnY8/
Bottom line, when you type into the box, the value is put into the textarea and any incorrect words are underlined and turned red. At the moment it only flags the last word as being incorrect. You need to comment that line out, uncomment the for loop, and implement the isMispelled(String)
function.
[edit]
Here is a further proof of concept: http://jsfiddle.net/tEnY8/4/
Basically I've set up an array of correctly spelled words, then the loop checks if the word exists in the array; if it does not then the word is probably mis-spelled.