[Javascript] How do I retrieve values from custom attributes on a DIV?

Peter-Paul Koch gassinaumasis at hotmail.com
Fri Jun 21 03:40:23 CDT 2002


>I have a DIV with several custom attributes on it...
>
>    <div id="areaTwo"
>         name="areaTwo"
>         bgColor="red"
>         sizeControl="false"
>         minH="50"
>         minW="50"
>         bufRt="100"
>         bufBt="50"
>         onClick='displayIt()'>Area 2</div>
>
>In IE 4/5 I can retrieve these values, but I can't find a way to get them 
>in
>NN4/6.

NN4: Impossible. NN6: Try

document.getElementById('areaTwo').getAttribute('sizeControl');

Not sure if this works, but it's your best chance.

ppk

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com




More information about the Javascript mailing list