Javascript

getElementById, getAttribute, innerHTML

Yo, it's the yo.
Such a rock star, you are.

HEYHEY (yo) - (innerHTML)
BOYGIRL (dude) - (innerHTML)
function getName(spanId) {
window.alert(document.getElementById(spanId).getAttribute('id'));
}

function getContent(spanId) {
window.alert(document.getElementById(spanId).innerHTML);
}