Si entendi bien, necesitas obtener los atributos de ciertas etiquetas?
Código PHP:
function getAttribute(tagName)
{
var tag = document.getElementsByTagName(tagName);
for (attribute in tag[0])
alert("atributo: " + attribute + " = '" + tag[attribute] + "'");
}
Espero haber ayudado