Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within HTML Pages with CSS and JavaScript
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
HTML Pages with CSS and JavaScript
getting id attribute value of html element
ganesh pol
Ranch Hand
Posts: 151
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i am having requiremnt for getting id value of my html element
eg.
<th id="test1" width="5%">Attempted RRC Connection</th>
in above case test1 is value of my th element
how should i get it using javascript
Muhammad Saifuddin
Ranch Hand
Posts: 1325
I like...
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Your question is not clear about what you trying to get.
if you want to get the value of <th> by its ID then go for this code
<script> var val = document.getElementById("test1").innerHTML; alert(val); </script>
are you looking for this?
[ April 04, 2007: Message edited by: Saif uddin ]
Saifuddin..
[Blog]
[Linkedin]
How To Ask Questions On JavaRanch
My OpenSource
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Problem iterating rows of a ResultSet with JSP
Having trouble with a javascript assignment
How to retrieve the values of dynamically created text boxes in jsp
using ajax and struts iterate tags
logic:iterate
More...