JSREF
JavaScript throw
This example examines input.