dcsimg
Function for returning all Elements in a document
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nikhil_Varma
Posted On:   Monday, September 29, 2003 07:08 AM


Is there a method in javascript similar to document.getAllElements() which would return all the elements in the document?What would be the return type of such a method.



Also where can I find any javascipt API?



Thanks!

Re: Function for returning all Elements in a document

Posted By:   Firat_Tiryaki  
Posted On:   Monday, October 6, 2003 01:36 AM

The document object includes child array objects that can help to gain the element names. The below is all the properties and child objects of document object in my IE6 machine. try to use them.


namespaces [object]
lastModified 03/03/2003 15:25:30
parentNode null
nodeType 9
fileCreatedDate 11/16/2002
onbeforeeditfocus null
bgColor #ffffff
oncontextmenu null
onrowexit null
embeds [object]
scripts [object]
onactivate null
mimeType HTML Document
alinkColor #0000ff
onmousemove null
onselectstart null
oncontrolselect null
body [object]
protocol File Protocol
onkeypress null
onrowenter null
onmousedown null
vlinkColor #800080
URL file://C:firatJavaScriptgetObject.html
onreadystatechange null
doctype null
onbeforedeactivate null
applets [object]
fileModifiedDate 03/03/2003
onmouseover null
dir
media
defaultCharset windows-1254
firstChild [object]
plugins [object]
onafterupdate null
ondragstart null
oncellchange null
cookie
documentElement [object]
nextSibling null
nameProp Untitled
referrer
ondatasetcomplete null
onmousewheel null
onerrorupdate null
onselectionchange null
lastChild [object]
ondblclick null
onkeyup null
location file:///C:/firat/JavaScript/getObject.html
forms [object]
title Untitled
onrowsinserted null
previousSibling null
compatMode BackCompat
onmouseup null
onkeydown null
onrowsdelete null
onfocusout null
fgColor #000000
ondatasetchanged null
onmouseout null
parentWindow [object]
nodeName #document
onpropertychange null
onstop null
onhelp null
linkColor #0000ff
onbeforeactivate null
images [object]
readyState complete
frames [object]
all [object]
onbeforeupdate null
onclick null
childNodes [object]
onfocusin null
anchors [object]
selection [object]
fileUpdatedDate
domain
security This type of document does not have a security certificate.
fileSize 874
ownerDocument null
ondataavailable null
styleSheets [object]
nodeValue null
attributes null
activeElement [object]
implementation [object]
links [object]
URLUnencoded file://C:firatJavaScriptgetObject.html
ondeactivate null
form1 [object]
About | Sitemap | Contact