this

B

bender

<DIV ID="d1" onmouseover="show(this,ds1);" class="menu">News</DIV>

What does it actually mean to send 'this' to the function Show ? Is it a
referanse to <div id="d1"... > tag ?

Could I swap 'this' with 'd1' and it would be just the same ?
 
D

David Dorward

bender said:
<DIV ID="d1" onmouseover="show(this,ds1);" class="menu">News</DIV>

What does it actually mean to send 'this' to the function Show ? Is it a
referanse to <div id="d1"... > tag ?

Its a reference to the current element. Which is the same as
document.getElementById('d1').
Could I swap 'this' with 'd1' and it would be just the same ?

No, 'd1' (and 'ds1') are a nasty non-standard thing with limited support.
Switch to the standard DOM.
 
B

bender

David Dorward said:
Its a reference to the current element. Which is the same as
document.getElementById('d1').


No, 'd1' (and 'ds1') are a nasty non-standard thing with limited support.
Switch to the standard DOM.

Apprecaite your response.

What is standard DOM ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,082
Messages
2,570,589
Members
47,211
Latest member
Shamestone

Latest Threads

Top