WA
11-01-2002, 12:26 AM
I was wondering, let say I have the following HTML fragment:
<b>this is some text<b>
<span>This is some more text<span>
<script>
//my script here
</script>
and inside the script above, I wish to gain access to the elements and text above. Is it possible to do so without having to explicitly denote an ID attribute somewhere to use as the starting pointing? Something like:
currentposition.previousSibling //should return <span> tag
Thanks,
<b>this is some text<b>
<span>This is some more text<span>
<script>
//my script here
</script>
and inside the script above, I wish to gain access to the elements and text above. Is it possible to do so without having to explicitly denote an ID attribute somewhere to use as the starting pointing? Something like:
currentposition.previousSibling //should return <span> tag
Thanks,