Т.е. Вы хотите получить название этих самых полей? Но вроде у объекта нет свойства Label.
X++:
function getElementsByClass(searchClass,node,tag) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp('(^|\\s)'+searchClass+'(\\s|$)');
for (i = 0, j = 0; i < elsLen; i++) {
if ( pattern.test(els[i].className) ) {
classElements[j] = els[i];
j++;
}
}
return classElements;
}
function getElementsByAttribute(node,tag,attribute,value) {
var classElements = new Array();
if ( node == null )
node = document;
if ( tag == null )
tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
for (var i=0, j=0; i<elsLen; i++)
{
if(els[i].getAttribute(attribute) == value)
{
classElements[j] = els[i];
j++;
}
}
return classElements;
}
Используйте любую. Чтобы найти все метки что-то типа getElementsByClass("td", null, "n") - получите все метки необязательные к заполнению. Есть еще "req" и "rec", а далее смотрите свойство Titile.
Удачи!