se questo e' quanto ti serve basta
alert('ciao ' + this.id);