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)

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!
Avatar of callrs

Link to home
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


It's work well!

"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.