Link to home
Start Free TrialLog in
Avatar of HuyBD
HuyBDFlag for Viet Nam

asked on

Get value of DIV's attributes

Hi all

I have a script to get value of DIV's attributes

<div onClick="onclk(this);" retval="return value"></div>

the script like that:

function onclk(el)
{
 alert(el.retval);
}

The problem is that, It work well with IE but in FireFox, It raise message "undefined!"

The question is: How to get value of DIV's attributes in FireFox

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of callrs
callrs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HuyBD

ASKER

It's work well!

Thanks!
"retval" is not a valid attribute for div.  Why do you need the div to store "return value" in it?  There might be other ways of accomplishing what you're trying to do.