<html> <body> <button id="myButton" onclick="alert(this.attributes['id'].specified);"> Specified Attributes </button> </body> </html>