Hola a todos,
Mi página tiene este pedazo de código en JS:
Código:
<script type="text/javascript">
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
}
}
}
</script>
Entonces cuando voy a validad mi página en XHTML Strict me devuelve esto:
Line 20, column 29: character ";" not allowed in attribute specification list
for (var i=0; i<sfEls.length; i++) {
Line 20, column 29: element "sfEls.length" undefined
for (var i=0; i<sfEls.length; i++) {
Line 29, column 8: end tag for "sfEls.length" omitted, but OMITTAG NO was specified
</script>
You may have neglected to close a tag, or perhaps you meant to "self-close" a tag; that is, ending it with "/>" instead of ">".
Line 20, column 16: start tag was here
for (var i=0; i<sfEls.length; i++) {
¿Cómo puedo corregir esto?
La página es:
www.ingeniarte.com