I have a handle on an Un-ordered List (for my example i will call the handle Var1) and would like to be able to assign its last li to a variable. I tried Lastli = var
Lastli = var
you can select all 'li' and take the last one. Something like:
var myLi = document.getElementsByTagName('li'); var lastLi = myLi[myLi.length-1];