views:

34

answers:

1

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?

+1  A: 

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

Example:

var theElement = document.getElementById("lblSelectedTests");
Marcel Korpel
if I do above var alert(document.getElementById("lblSelectedTests")); it says in alert [Object]
@user: Indeed, that's the intended behaviour. You can manipulate your elements this way.
Marcel Korpel