Detecting (Non)Numeric Input
Instructor Presentation
Lecture Slides: Checking Whether User Input Is A Number
Examples - Checking Whether User Input Is A Number
jQuery template- file
(Note that this assumes that you've got a local copy of jQuery-1.11.3.js in the same folder)
loose_typing.html
checking_for_numbers.html
In-Class Exercises (ICEs)
In-Class Exercises
- Checking Whether User Input Is A Number
Supplementary Materials
JavaScript: checking if a string is a number
This question on StackOverflow
W3Schools reference on isNaN
MDN reference on isNaN
(You can find the W3Schools/MDN references for parseFloat and parseInt on your own)
Video Recordings Of In-Class Lectures
Videos from this lecture