Chapter 6. Using Core HTML Methods and Events


Chapter 6. Using Core HTML Methods and Events

graphics/chic01.gif

In the preceding chapter, we saw Java Script's core HTML properties; in this chapter, we'll take a look at JavaScript's core HTML methods and events. You can find JavaScript's core HTML methods and events in Table 6.1, and we'll cover them all in this chapter.

Tip

Note the capitalization in Table 6.1; methods use the Java capitalization schemefor instance, removeChild but events are all in lower case, such as onmousemove . Some books use the Java capitalization scheme for events too, such as onMouseMove , but that's incorrect; it's really onmousemove and because capitalization counts in JavaScript, using onMouseMove won't work.


Table 6.1. Core Methods and Events of HTML Elements

Methods

Events

addBehavior

onactivate

addEventListener

onbeforeactivate

appendChild

onbeforecopy

applyElement

onbeforecut

attachEvent

onbeforedeactivate

blur

onbeforeeditfocus

clearAttributes

onbeforepaste

click

onblur

cloneNode

onclick

componentFromPoint

oncontextmenu

contains

oncontrolselect

detachEvent

oncopy

dispatchEvent

oncut

dragDrop

ondblclick

fireEvent

ondeactivate

focus

ondrag

getAdjacentText

ondragend

getAttribute

ondragenter

getAttributeNode

ondragleave

getBoundingClientRect

ondragover

getClientRects

ondragstart

getElementsByTagName

ondrop

getExpression

onfilterchange

hasChildNodes

onfocus

insertAdjacentElement

onfocusin

insertAdjacentHTML

onfocusout

insertAdjacentText

onhelp

insertBefore

onkeydown

item

onkeypress

mergeAttributes

onkeyup

normalize

onlosecapture

releaseCapture

onmousedown

removeAttribute

onmouseenter

removeAttributeNode

onmouseleave

removeBehavior

onmousemove

removeChild

onmouseout

removeEventListener

onmouseover

removeExpression

onmouseup

removeNode

onmousewheel

replaceAdjacentText

onmove

replaceChild

onmoveend

replaceNode

onmovestart

scrollIntoView

onpaste

setActive

onpropertychange

setAttribute

onreadystatechange

setAttributeNode

onresize

setCapture

onresizeend

setExpression

onresizestart

supports

onselectstart

swapNode

ontimeerror

tags

 

urns

 

Like the preceding chapter, this chapter is intended partly for reference; to cover all of JavaScript's core HTML methods and events, we'll occasionally need to cover some topics that we haven't discussed yet and which are coming up in later chapters, such as style sheets or Dynamic HTML. As in the preceding chapter, that won't be a problem for the most part, but feel free to skip that material until you need it when dealing with the programming in later chapters.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net