How we can get alt tag using function?

A

Anonymous

Guest
Hi,

Try this:
<html>
<head>
<script>

$('img').click(function () {
var alt = $(this).attr("alt")
alert(alt);
});

</script>
</head>

<img src="white.png" width="25px" height="25px" alt="1" id="star1" onmouseover="starOverOne()" onmouseout="starOutOne()"/>
I hopes it help

Thanks
 
Back
Top