<html> <body> <img id="myImg" src="http://www.java2java.com/style/logo.png" longdesc="Java2s's Logo"> <button onclick="alert(myImg.longDesc);">Long Desc</button> </body> </html>