Mastering the Web
Contents
Website Planning Tutorial
Website Design Tutorial
HTML Tutorial
HTML Tables Tutorial
CGI Tutorial
JavaScript Tutorial
Perl Tutorials
CSS Tutorial
Installing a Web Server
Security Tutorial
HTML Cookies Tutorial
Web Tracking Tutorial
Download Free Programs
F.A.Q.

  1. JavaScript Tutorial
  2. How to make pop-up windows
  3. JavaScript Object Reference (1)
  4. JavaScript Object Reference (2)
  5. JavaScript Object Reference (3)
  6. JavaScript Object Reference (4)
  7. JavaScript Object Reference (5)
  8. JavaScript Object Reference (6)
  9. JavaScript Functions and Operators

Download FWTLogstat1

Download FWTLogstat2

JavaScript Object Reference (5)

The string Object

The string object provides properties and methods for working with string literals and variables.

Properties

length
An integer value containing the length of the string expressed as the number of characters in the string.

Methods

anchor(name)
Returns a string containing the value of the string object surrounded by an A container tag with the NAME attribute set to name.
big()
Returns a string containing the value of the string object surrounded by a BIG container tag.
blink()
Returns a string containing the value of the string object surrounded by a BLINK container tag.
bold()
Returns a string containing the value of the string object surrounded by a B container tag.
charAt(index)
Returns the character at the location specified by index.
fixed()
Returns a string containing the value of the string object surrounded by a FIXED container tag.
fontColor(color)
Returns a string containing the value of the string object surrounded by a FONT container tag with the COLOR attribute set to color where color is a color name or an RGB triplet.
fontSize(size)
Returns a string containing the value of the string object surrounded by a FONTSIZE container tag with the size set to size.
indexOf(findString,startingIndex)
Returns the index of the first occurrence of findString, starting the search at startingIndex where startingIndex is optional; if it is not provided, the search starts at the start of the string.
italics()
Returns a string containing the value of the string object surrounded by an I container tag.
lastIndexOf(findString,startingIndex)
Returns the index of the last occurrence of findString. This is done by searching backwards from startingIndex. startingIndex is optional and assumed to be the last character in the string if no value is provided.
link(href)
Returns a string containing the value of the string object surrounded by an A container tag with the HREF attribute set to href.
small()
Returns a string containing the value of the string object surrounded by a SMALL container tag.
strike()
Returns a string containing the value of the string object surrounded by a STRIKE container tag.
sub()
Returns a string containing the value of the string object surrounded by a SUB container tag.
substring(firstIndex,lastIndex)
Returns a string equivalent to the substring starting at firstIndex and ending at the character before lastIndex. If firstIndex is greater than lastIndex, the string starts at lastIndex and ends at the character before firstIndex.
sup()
Returns a string containing the value of the string object surrounded by a SUP container tag.
toLowerCase()
Returns a string containing the value of the string object with all characters converted to lower case.
toUpperCase()
Returns a string containing the value of the string object with all characters converted to upper case.

The submit Object

The submit object reflects a submit button from an HTML form in JavaScript.

Properties

name
A string value containing the name of the submit button element.
value
A string value containing the value of the submit button element.

Methods

click()
Emulates the action of clicking on the submit button.

Event Handlers

onClick
Specifies JavaScript code to execute when the submit button is clicked.

The text Object

The text object reflects a text field from an HTML form in JavaScript.

Properties

defaultValue
A string value containing the default value of the text element (i.e. the value of the VALUE attribute).
name
A string value containing the name of the text element.
value
A string value containing the value of the text element.

Methods

focus()
Emulates the action of focusing in the text field.
blur()
Emulates the action of removing focus from the text field.
select()
Emulates the action of selecting the text in the text field.

Event Handlers

onBlur
Specifies JavaScript code to execute when focus is removed from the field.
onChange
Specifies JavaScript code to execute when the content of the field is changed.
onFocus
Specifies JavaScript code to execute when focus is given to the field.
onSelect
Specifies JavaScript code to execute when the user selects some or all of the text in the field.

Previous | Contents | Next

| HOME | FEEDBACK | BOOKMARK |
Build your Website
© 1999-2008 Hector Castro -- All rights reserved

If your doubt is not answered in this site, please use the
contact form .
I'll answer as soon as posible.
I can help you using instant messaging. To schedule a meeting, please use the
meeting form.
You will find the late news about the free programs offered here on my blog
Free Webmaster Tools
You can get news about updates to my free programs through this
RSS feed.

www.great-web-info.com