SQL PHP HTML ASP JavaScript articles and free scripts to download
 

JavaScript string functions

JavaScript has many string functions to manage our scripts. We will discuss more about these functions with examples here.

We can use them along with many other different function to get our desired output. Here are some of them .

String Object

How to declare a string object and use its properties with examples.

toUpperCase

We can convert any text or string from Lower case to Upper Case text by using this function.

toLowerCase

We can convert Upper case text to Lower case text by using this function

bold

Bold function changes the font style to bold.

length

We can count the total number of chars present including the blank space by using length function.

charat

We can specify a location and get the character present their by using charat function.

concat : Adding strings

We can add two or more strings by using concat function.

indexOf

This returns the first occurrence of a substring within the main string.

replace

We can use replace function to search and replace part of a string

reversing a string

We will use charat and length property to reverse a string

escape & unescape

Before sending a string over network we can escape it.

search

We can use search function to search for a part of a string inside a main string.

slice

Slice function can be used to collect part of a string by saying start and length of the substring.

substring

WE can collect part of a main string by using substring function.

userid and domain part

We can extract userid and domain part of an email address by using different string functions.

changing text case using onblur event

We can change the case of the text entered by using unblour event handler.

Found anything wrong or wants to improve the code by adding more features? Post your short comment here or use the Forum



Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

Join Our Email List
Email:  
For Email Newsletters you can trust
String Functions
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2013 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer