JavaScript Reference

advertisement
JavaScript Reference
The references describe the properties and methods of all JavaScript objects, along with
examples.
String
olean
Number
Operators
RegExp
Statements
MathDate
Array
Bo
GlobalConversion
Browser Objects Reference
The references describe the properties and methods of each object, along with examples.
Window
Navigator
Screen
History
Location
HTML DOM Reference
The references describe the properties and methods of the HTML DOM, along with examples.
DOM Document
DOM Elements
DOM Attributes
DOM Events
HTML Element Objects Reference
The references describe the properties and methods of each HTML object, along with examples.
OBJECT
OBJECT NAME
OBJECT DESCRIPTION
<a>
Anchor (1-3)
<abbr>
Abbreviation (4-6)
<address>
Address (7-9)
<area>
Area (10-12)
1. The Anchor object represents an HTML <a>
element.
2. You can access an <a> element by using
getElementById():
var x = document.getElementById("myAnchor");
3. You can create an <a> element by using
the document.createElement() method:
var x = document.createElement("A");
4. The Abbreviation object represents an
HTML <abbr> element.
5. You can access an <abbr> element by
using getElementById():
var x = document.getElementById("myAbbr");
6. You can create an <abbr> element by
using the document.createElement()
method:
var x = document.createElement("ABBR");
7. The Address object represents an
HTML <address> element.
8. You can access an <address> element
by using getElementById():
var x = document.getElementById("myAdr")
9. You can create an <address> element
by using the document.createElement()
method:
var x = document.createElement("ADDRESS");
10.
The Area object represents an HTML
<area> element.
11.
You can access an <area> element
by using getElementById():
var x = document.getElementById("myArea");
12.
You can create an <area> element
by
using the document.createElement()
method:
var x = document.createElement("AREA");
<article>
<aside>
13.
<audio>
<b>
<base>
<colgroup>
<datalist>
<dd>
<del>
<details>
<dfn>
<dialog>
<div>
<dl>
<dt>
<em>
<embed>
<fieldset>
<figcaption>
<figure>
<footer>
<form>
<head>
<header>
<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
<input> url
<input> week
<kbd>
<keygen>
<label>
<legend>
<li>
<link>
<map>
<mark>
<menu>
<menuitem>
<meta>
<meter>
<nav>
<object>
<ol>
<optgroup>
<option>
<output>
<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>
Anchor Object Properties
= Property added in HTML5.
Property
Description
charset
Not supported in HTML5.
Sets or returns the value of the charset attribute of a link
download
Sets or returns the value of the download attribute of a link
hash
Sets or returns the anchor part of the href attribute value
host
Sets or returns the hostname and port part of the href attribute value
hostname
Sets or returns the hostname part of the href attribute value
href
Sets or returns the value of the href attribute of a link
hreflang
Sets or returns the value of the hreflang attribute of a link
origin
Returns the protocol, hostname and port part of the href attribute
value
name
Not supported in HTML5. Use element.id instead.
Sets or returns the value of the name attribute of a link
password
Sets or returns the password part of the href attribute value
pathname
Sets or returns the pathname part of the href attribute value
port
Sets or returns the port part of the href attribute value
protocol
Sets or returns the protocol part of the href attribute value
rel
Sets or returns the value of the rel attribute of a link
rev
Not supported in HTML5.
Sets or returns the value of the rev attribute of a link
search
Sets or returns the querystring part of the href attribute value
target
Sets or returns the value of the target attribute of a link
text
Sets or returns the text content of a link
type
Sets or returns the value of the type attribute of a link
username
Sets or returns the username part of the href attribute value
Area Object Properties
Property
Description
alt
Sets or returns the value of the alt attribute of an area
coords
Sets or returns the value of the coords attribute of an area
hash
Sets or returns the anchor part of the href attribute value
host
Sets or returns the hostname and port part of the href attribute value
hostname
Sets or returns the hostname part of the href attribute value
href
Sets or returns the value of the href attribute of an area
noHref
Not supported in HTML5.
Sets or returns the value of the nohref attribute of an area
origin
Returns the protocol, hostname and port part of the href attribute
value
password
Sets or returns the password part of the href attribute value
pathname
Sets or returns the pathname part of the href attribute value
port
Sets or returns the port part of the href attribute value
protocol
Sets or returns the protocol part of the href attribute value
search
Sets or returns the querystring part of the href attribute value
shape
Sets or returns the value of the shape attribute of an area
target
Sets or returns the value of the target attribute of an area
username
Sets or returns the username part of the href attribute value
Download