[thelist] DOM question

Peter-Paul Koch pp.koch at gmail.com
Thu Mar 3 17:08:46 CST 2005


> I'm racking my brains on this because I've forgotten everything I knew it seems. Anyway, I have a  particular A object reference from a link being clicked. I want to get the *actual link text* of  the anchor (not the href).
> function ChooseItem(choice) {
>   var myLinkText = choice.(some DOM call here)
> }

var myLinkText = choice.text 

should do the trick.

-- 
-------------------------------------------------------------------
ppk, freelance web developer

Bug Report: Report bugs yourself, or comment on previously 
reported ones.
http://www.quirksmode.org/bugreports/
------------------------------------------------------------------


More information about the thelist mailing list