HuyBD
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
"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.
ASKER
Thanks!