Javascript and HTML Dom Referencejavascript String Reference
Javascript and HTML Dom Referencejavascript String Reference
HTML
CSS
JAVASCRIPT
SQL
PHP
JQUERY
ANGULAR
BOOTSTRAP
XML
ASP.NET
MORE...
JavaScript Reference
Overview
JavaScript
JS String
JS Number
JS Operators
JS Statements
JS Math
W3Schools Home
JS Date
JS Array
JS Boolean
JS RegExp
JS Global
Browser BOM
Window
Navigator
Screen
History
Location
HTML DOM
DOM Document
DOM Elements
DOM Attributes
DOM Events
HTML Objects
<a>
<abbr>
<address>
<area>
<article>
<aside>
<audio>
<b>
<base>
<bdo>
<blockquote>
<body>
<br>
<button>
<canvas>
JavaScript Reference
The references describe the properties and methods of all JavaScript objects, along
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
JavaScript
Strings
Numbers
Operators
Statements
Math Object
Date Object
Arrays
Booleans
RegExp Object
Global Object
The references describe the properties and methods of each object, along with exam
Window object
Navigator object
Screen object
History object
Location object
The references describe the properties and methods of the HTML DOM, along with e
HTML Document
http://www.w3schools.com/jsref/default.asp
<caption>
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<head>
<header>
<hgroup>
<h1> - <h6>
<hr>
<html>
<i>
<iframe>
<img>
<ins>
<input> button
<input> checkbox
<input> color
<input> date
<input> datetime
<input> datetime-local
<input> email
<input> file
<input> hidden
<input> image
<input> month
<input> number
<input> password
<input> radio
<input> range
<input> reset
<input> search
<input> submit
<input> text
<input> time
HTML Element
HTML Attributes
HTML Events
The references describe the properties and methods of each HTML object, along wit
Anchor object
Abbreviation object
Address object
Area object
Article object
Aside object
Audio object
Bold object
Base object
Bdo object
Blockquote object
Body object
BR object
Button object
Canvas object
Caption object
Cite object
Code object
Column object
ColumnGroup object
Datalist object
Del object
Details object
DFN object
Dialog object
Div object
DList object
DT object
Emphasized object
Embed object
Fieldset object
Figcaption object
Figure object
Footer object
Form object
Head object
Header object
Heading object
HGroup object
HR object
HTML object
Italic object
IFrame object
Image object
Ins object
Input Button object
Input Checkbox object
Input Color object
Input Date object
Input Datetime object
Input Datetime Local object
http://www.w3schools.com/jsref/default.asp
<input> url
<input> week
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<menuitem>
<meta>
<meter>
<nav>
<object>
<ol>
<optgroup>
<option>
<p>
<param>
<pre>
<progress>
<q>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<td>
<th>
<tr>
<textarea>
<time>
<title>
<track>
<u>
<ul>
<var>
<video>
Underline object
Ul object
Variable object
Video object
W3Schools Home
Next Refere
Top 10 Tutorials
Top 10 References
Top 10 Examples
Web Certifi
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
XML Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
jQuery Tutorial
Angular Tutorial
Bootstrap Tutorial
HTML Reference
CSS Reference
JavaScript Reference
Browser Statistics
HTML DOM
XML DOM
PHP Reference
jQuery Reference
HTML Colors
HTML Character Sets
HTML Examples
CSS Examples
JavaScript Examples
HTML DOM Examples
PHP Examples
jQuery Examples
XML Examples
XML DOM Examples
ASP Examples
SVG Examples
HTML Certific
HTML5 Certif
CSS Certifica
JavaScript Ce
jQuery Certif
PHP Certifica
XML Certifica
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. T
constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read a
privacy policy. Copyright 1999-2014 by Refsnes Data. All Rights Reserved.
HOME
HTML
CSS
JAVASCRIPT
SQL
PHP
JQUERY
ANGULAR
BOOTSTRAP
XML
JavaScript Reference
Overview
JavaScript
JS String
JS Number
JS Operators
JS Statements
JS Math
Previous
http://www.w3schools.com/jsref/default.asp
ASP.NET
MORE...
JS Date
JS Array
JS Boolean
JS RegExp
JS Global
Browser BOM
Window
Navigator
JavaScript Strings
A JavaScript string stores a series of characters like "John Doe".
A string can be any text inside double or single quotes:
var carname = "Volvo XC60";
var carname = 'Volvo XC60';
Screen
History
Location
String indexes are zero-based: The first character is in position 0, the second in 1,
For a tutorial about Strings, read our JavaScript String Tutorial.
HTML DOM
DOM Document
DOM Elements
DOM Attributes
DOM Events
HTML Objects
<a>
<abbr>
<address>
Primitive values, like "John Doe", cannot have properties or methods (because they
But with JavaScript, methods and properties are also available to primitive values,
primitive values as objects when executing methods and properties.
String Properties
<area>
Property
Description
<article>
constructor
length
prototype
<aside>
<audio>
<b>
<base>
<bdo>
<blockquote>
<body>
<br>
<button>
<canvas>
<caption>
<cite>
<code>
<col>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<div>
<dl>
<dt>
String Methods
Method
Description
charAt()
charCodeAt()
concat()
fromCharCode()
indexOf()
lastIndexOf()
localeCompare()
match()
replace()
<em>
http://www.w3schools.com/jsref/default.asp
<embed>
search()
slice()
split()
substr()
<h1> - <h6>
substring()
<hr>
toLocaleLowerCase()
toLocaleUpperCase()
toLowerCase()
toString()
toUpperCase()
trim()
valueOf()
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<head>
<header>
<hgroup>
<html>
<i>
<iframe>
<img>
<ins>
<input> button
<input> checkbox
<input> color
<input> date
<input> datetime
<input> datetime-local
<input> email
<input> file
<input> hidden
<input> image
<input> month
<input> number
<input> password
The HTML wrapper methods return the string wrapped inside the appropriate HTML
These are not standard methods, and may not work as expected in all browsers.
Method
Description
<input> range
anchor()
Creates an anchor
<input> reset
big()
blink()
bold()
fixed()
fontcolor()
fontsize()
italics()
<link>
link()
<map>
small()
strike()
sub()
sup()
<input> radio
<input> search
<input> submit
<input> text
<input> time
<input> url
<input> week
<kbd>
<keygen>
<label>
<legend>
<li>
<mark>
<menu>
<menuitem>
<meta>
<meter>
<nav>
http://www.w3schools.com/jsref/default.asp
<object>
<ol>
<optgroup>
Previous
<option>
<p>
<param>
<pre>
<progress>
<q>
<s>
<samp>
<script>
<section>
<select>
<small>
<source>
<span>
<strong>
<style>
<sub>
<summary>
<sup>
<table>
<td>
<th>
<tr>
<textarea>
<time>
<title>
<track>
<u>
<ul>
<var>
<video>
Top 10 Tutorials
Top 10 References
Top 10 Examples
Web Certifi
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
XML Tutorial
SQL Tutorial
PHP Tutorial
ASP.NET Tutorial
jQuery Tutorial
Angular Tutorial
Bootstrap Tutorial
HTML Reference
CSS Reference
JavaScript Reference
Browser Statistics
HTML DOM
XML DOM
PHP Reference
jQuery Reference
HTML Colors
HTML Character Sets
HTML Examples
CSS Examples
JavaScript Examples
HTML DOM Examples
PHP Examples
jQuery Examples
XML Examples
XML DOM Examples
ASP Examples
SVG Examples
HTML Certific
HTML5 Certif
CSS Certifica
JavaScript Ce
jQuery Certif
PHP Certifica
XML Certifica
W3Schools is optimized for learning, testing, and training. Examples might be simplified to improve reading and basic understanding. T
constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using this site, you agree to have read a
http://www.w3schools.com/jsref/default.asp
http://www.w3schools.com/jsref/default.asp