Friday, May 10, 2024
 Popular · Latest · Hot · Upcoming
135
rated 0 times [  141] [ 6]  / answers: 1 / hits: 16749  / 14 Years ago, tue, june 8, 2010, 12:00:00

I have a span like this:


<span id="selectedTests" class="emrFG">  
<span id="lblSelectedTests" class="emrHDR" style="top:3;left:6;font-size:8pt;">Selections</span>
<span class="emrHDR" style="top:3;left:190;font-size:8pt;">Tests</span>
<div id="recordSet" style="top:19;height:112;width:444;"></div>
</span>

The span shows some rows of data and I want to call those rows individually by using document.all method.

How would I do that?


More From » javascript

 Answers
62

document.all is very old, see my answer to another question. Use document.getElementById instead.



Example:



var theElement = document.getElementById(lblSelectedTests);

[#96557] Friday, June 4, 2010, 14 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
latrelllloydb

Total Points: 449
Total Questions: 92
Total Answers: 100

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
;