Jump to content

How to get element from document ?

Recommended Posts



I need to reference an element in a document but when i try looping through the elements the properties are all undefined ? Is it possible to get the reference to the element another way ? E.g. directly from the pascal created component ?




var xname=''; 

var e = document.getElementsByTagName('*'); 
for (var i=0, x=e.length; i<x; i++){  xname=xname+' Id:'+e.id+' Class:'+e.ClassName;} 


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...