w3schools
Search W3Schools :  
  
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
VectorStock

JS Reference

JS Overview
JS Array
JS Boolean
JS Date
JS Math
JS Number
JS String
JS RegExp
JS Functions
JS Events

HTML DOM Objects

DOM Window
DOM Navigator
DOM Screen
DOM History
DOM Location

DOM Document

DOM Anchor
DOM Area
DOM Base
DOM Body
DOM Button
DOM Event
DOM Form
DOM Frame
DOM Frameset
DOM IFrame
DOM Image
DOM Input Button
DOM Input Checkbox
DOM Input File
DOM Input Hidden
DOM Input Password
DOM Input Radio
DOM Input Reset
DOM Input Submit
DOM Input Text
DOM Link
DOM Meta
DOM Object
DOM Option
DOM Select
DOM Style
DOM Table
DOM TableCell
DOM TableRow
DOM Textarea

 

JavaScript String Object Reference

previous next

The String Object

The String object let's you work with text.

Syntax for creating a String object:

var myStr=new String(string);

String Object Properties

FF: Firefox, IE: Internet Explorer

Property Description FF IE
constructor A reference to the function that created the object 1 4
length Returns the number of characters in a string 1 3
prototype Allows you to add properties and methods to the object 1 4

String Object Methods

Method Description FF IE
anchor() Creates an HTML anchor 1 3
big() Displays a string in a big font 1 3
blink() Displays a blinking string 1  
bold() Displays a string in bold 1 3
charAt() Returns the character at a specified position 1 3
charCodeAt() Returns the Unicode of the character at a specified position 1 4
concat() Joins two or more strings 1 4
fixed() Displays a string as teletype text 1 3
fontcolor() Displays a string in a specified color 1 3
fontsize() Displays a string in a specified size 1 3
fromCharCode() Takes the specified Unicode values and returns a string 1 4
indexOf() Returns the position of the first occurrence of a specified string value in a string 1 3
italics() Displays a string in italic 1 3
lastIndexOf() Returns the position of the last occurrence of a specified string value, searching backwards from the specified position in a string 1 3
link() Displays a string as a hyperlink 1 3
match() Searches for a specified value in a string 1 4
replace() Replaces some characters with some other characters in a string 1 4
search() Searches a string for a specified value 1 4
slice() Extracts a part of a string and returns the extracted part in a new string 1 4
small() Displays a string in a small font 1 3
split() Splits a string into an array of strings 1 4
strike() Displays a string with a strikethrough 1 3
sub() Displays a string as subscript 1 3
substr() Extracts a specified number of characters in a string, from a start index 1 4
substring() Extracts the characters in a string between two specified indices 1 3
sup() Displays a string as superscript 1 3
toLowerCase() Displays a string in lowercase letters 1 3
toUpperCase() Displays a string in uppercase letters 1 3
toSource() Represents the source code of an object 1 -
valueOf() Returns the primitive value of a String object 1 4


previous next

Reliable, Affordable, Feature-Rich Web Hosting!

GoDaddy.com

Take the uncertainty out of Web hosting and let GoDaddy.com put service, performance and value back in. No matter which hosting type or plan you choose, your site receives 24/7 maintenance and protection in our world-class data center. Plus, you get the expert, friendly service you deserve, from the world's largest hostname provider.

With three plans to choose from and prices starting at just $4.99 per month, GoDaddy.com is sure to have a plan that's right-sized and right-priced just for you!

All plans feature FREE 24x7 setup, FREE 24x7 monitoring, best- of-breed routers, firewalls and servers, 24x7 onsite physical security and access to our exclusive Go Daddy Hosting Connection, THE place to install over 30 FREE applications. Virtual Dedicated and Dedicated Server plans also available. Visit GoDaddy.com today.

Virtual Dedicated, Dedicated Server and unlimited plans also available.

Save 20% on 12 months or more of shared web hosting - Enter code w3s20off at checkout



FUNC Travel
 
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Web Hosting
FREE Web Hosting
WEB BUILDING
Website Templates
Flash Templates
Website Builder
Internet Business Opportunity
Get a Freelancer
Download XML editor
FREE Flash Website
FREE Web Templates
FLIGHT TICKETS
Find the cheapest flight
to any destination now!
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
STATISTICS
Browser Statistics
Browser OS
Browser Display
W3Schools.com HOME | TOP | PRINT | FORUM | ABOUT
W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.