Link to home
Start Free TrialLog in
Avatar of tad91030
tad91030

asked on

Javascript img tag send src onclick

I want to gather the src information from a img tag and assign it to a variable and send it to a function.

<a href="javascript:void(0)" onclick="alert(document.image[this].src)"><img src="thisimage.jpg"></a>

and have the value alerted be 'thisimage.jpg'
ASKER CERTIFIED SOLUTION
Avatar of DireOrbAnt
DireOrbAnt

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