Problemas com 1 javascript

1 resposta
L

Galera,

Estou com problema nesse javascript aqui, ele funciona corretamente no mozilla mais no IE 6 e 7 ele não funciona, gostaria de saber se vcs podem me ajudar com esse javascript:

function preencheLabels() {

labels = document.getElementsByTagName(label);

for(i=0; i<labels.length; i++) {

try{

idElemento = labels[i].attributes[‘for’].value;

elemento = document.getElementById(idElemento)

if(elemento.type==text || elemento.type==textarea) {

elemento.value = labels[i].innerHTML;

//	   			 elemento.setAttribute(onfocus,javascript: recebeFoco(this,+i+); )

elemento.attributes[‘onfocus’].value = recebeFoco(this,+i+);;

idsCamposPreenchidos[i]=idElemento;

}

}catch(e){}

}

}

1 Resposta

D

boa tarde fera…

passa o teu código no verificador de javascript…

http://www.jslint.com/

se tiver alguma inconsistência o verificador vai acusar!

t+

Criado 30 de abril de 2007
Ultima resposta 30 de abr. de 2007
Respostas 1
Participantes 2