<html> <body> <a id="myL" href="http://www.java2java.com/" target="_blank" title="Java2s.com website">A website</a> <button onclick="alert(myL.title);">Title</button> </body> </html>