Javascript Tutorial Regular Expressions, Form Validation and Event Handlers
Today I’m going to continue teaching you everything about Javascript. If you haven’t read my other Javascript tutorials they are available here:
- Javascript Scripting Tutorial: Introduction
- Javascript Scripting Part 2: Functions, Variable, The DOM, Loops, Conditionals, and Event Handlers
You must read these tutorials before you have any hope of understanding the code that is coming. Like in the last tutorial I will teach you Javascript by walking you through a working script. As the title says above, this tutorial will focus on Regular Expressions, Form Validation and Event Handlers.
Regular Expressions
A Regular Expression is used to describe a series of characters, numbers and symbols. Regular expressions are used to verify that a visitor to your site entered a correct phone number or address. You would use a Regular Expression to state that the phone number:
- Must contain at least 7 digits ex. 412.828.3200
- It may have different symbols interspersed with these numbers ex. (412)-828-3200
- It may be proceeded by an additional number. ex. 1-412.828.3200 Continue reading Javascript Scripting Tutorial Part 3