[thelist] What does event.srcElement.innerText refer to?
Simon Willison
cs1spw at bath.ac.uk
Tue Oct 28 17:37:28 CST 2003
James Aylard wrote:
> Chris George wrote:
>
>
>>In my quest for JS knowledge, I came across this
>>event.srcElement.innerText that I'm not sure what it does.
>
> It references the innerText property of the element that initiated a
> particular event. srcElement is, I believe, IE-proprietary, but others
> correct me if I'm wrong. You could, for instance, write a script like this:
It is indeed IE proprietary, as is innerText. The Javascript event model
is the main place in which IE differs from the standards as implemented
by browsers such as Mozilla. PPK's Javascript section has excellent
coverage of the various event models: http://www.xs4all.nl/~ppk/js/
--
Simon Willison
Web development weblog: http://simon.incutio.com/
More information about the thelist
mailing list