473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

List all HTML-element in document

Hi all,

I'm looking for an alternate way to document.all to list all
HTML-elements on a webpage.

I'm trying to get all IDs on a page that starts with specific letters,
ie: <div class='classname' id='MEIT_Start'.....

I wan't to build an array of items starting with 'MEIT_'

I have tried to use getElementByID but no succes

suggestions??

reg.
Kjell Brandes

Nov 9 '06 #1
2 1784
kj**********@gmail.com wrote:
I'm looking for an alternate way to document.all to list all
HTML-elements on a webpage.
How about?

document.getElementsByTagName("*");
I'm trying to get all IDs on a page that starts with specific letters,
ie: <div class='classname' id='MEIT_Start'.....

I wan't to build an array of items starting with 'MEIT_'
Then you can loop through the elements returned by the above and test
the ID property for each to see if it begins with whatever prefix you wish.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
Nov 9 '06 #2
Thanks!

Dylan Parry skrev:
kj**********@gmail.com wrote:
I'm looking for an alternate way to document.all to list all
HTML-elements on a webpage.

How about?

document.getElementsByTagName("*");
I'm trying to get all IDs on a page that starts with specific letters,
ie: <div class='classname' id='MEIT_Start'.....

I wan't to build an array of items starting with 'MEIT_'

Then you can loop through the elements returned by the above and test
the ID property for each to see if it begins with whatever prefix you wish.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

Programming, n: A pastime similar to banging one's head
against a wall, but with fewer opportunities for reward.
Nov 10 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.