XXX Chats


Code for validating email in javascript

For more information, see ACTION Attribute | action Property and form property.The action attribute tells the browser what to do when a user submits the form.This is a code snippet for basic Java Script to validate email address using a regular expression.

//reported to validate incorrectly: [email protected] as true /[A-Z0-9._% -] @[A-Z0-9-] .

Lisa Wollin Microsoft Corporation May 2004 Applies to: Microsoft® Office Front Page® 2003 Microsoft Front Page 2002 Microsoft Front Page 2000 Summary: Learn how validate HTML form fields using Java Script in Microsoft Office Front Page 2003.

You may assign any name you want that is composed of alphanumeric characters (without spaces), but to make writing the code easiest, you should provide a useful, friendly name for each of the fields.

In addition, each of the fields should have a unique name.

Both Java Script and JScript are ECMAScript-compliant languages.

code for validating email in javascript-90

When referring to Java Script in general, this article uses the generally accepted term "Java Script." However, when referring to documentation on the Microsoft Developer Network (MSDN) Web site, this article uses the term "JScript." Note The previous code specifies an e-mail address for the Action attribute of the form property.

This article assumes a general understanding of HTML and Java Script.

(16 printed pages) Introduction Getting Started Writing the Validation Script Connecting the Form to the Script Associating Form Fields with Custom Script Code Listing Conclusion When you create forms, providing form validation is useful to ensure that your customers enter valid and complete data.

Otherwise, you may want to review JScript Run-Time and Syntax errors.

You need a custom function that you can later connect to the form.

Comments Code for validating email in javascript