CodesJava

Easy learning with example program codes

JavaScript IP address validation

IP address validation in JavaScript is used to insure that number entered in the specified IP address field should be a valid IP address.
Regular Expression:

/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
Read More

JavaScript string length validation

String length validation in JavaScript is used to make sure that number of characters entered in a specified field will be restricted. For example name field should … Read More

JavaScript alphabets validation

Letters or alphabets only validation in JavaScript is used to make sure that all the characters entered in the specified field must be any character from A-Z … Read More

JavaScript Map values() method

The JavaScript map values() method is used to retrieve an object of Map iterator that contains the values for each element.

Syntax:

mapObj.values()

Example:

<!DOCTYPE html
Read More

JavaScript Map set() method

The JavaScript map set() method adds a new or modifies the already existing key-value pairs to Map object.

Syntax:

mapObj.set(key,value)

Example:

<!DOCTYPE html>
Read More


Copyright © 2019 CodesJava DMCA.com Protection Status SiteMap Reference: Java Wiki