For example, if I have a list like this:
I want to be able to write a reference something like this:
Look at list item <span onload="olRef('L2')">xxx</span> and
...and have it display this:
Look at list item 2 and
To make this work I need a way of getting the number of the list item. I've seen examples that do it with the span element's value property, i.e.:
var number = document.getElementById('L2').value
but that isn't working for me. The value of .value is 0 (zero), and I don't see another property of the li object that contains its number. How do I do this?