Código javascript:
Ver original
<script language="JavaScript" type="text/javascript"> banners= new Array(); banners[0]="img_al/image1.png"; banners[1]="img_al/image2.png"; banners[2]="img_al/image3.png"; banners[3]="img_al/image4.png"; banners[4]="img_al/image5.png"; banners[5]="img_al/image6.png"; banners[6]="img_al/image7.png"; banners[7]="img_al/image8.png"; banners[8]="img_al/image9.png"; banners[9]="img_al/image10.png"; banners[10]="img_al/image11.png"; banners[11]="img_al/image12.png"; totalbanners = banners.length; var ahora = new Date() var segundos = ahora.getSeconds() var ad = segundos % totalbanners; seleccionado=banners[ad]; localizador=seleccionado.lastIndexOf('.'); localizador2=localizador+4 extension=seleccionado.substring(localizador+1,localizador2); archivo=seleccionado.substring(0,localizador); document.write('<img src='+seleccionado+' width="280" height="498" title="mititulo" alt="nodisponible" />'); // Fin // Fin </script>
me dice :
Código:
…80" height="498" title="mititulo" alt="nodisponible" />'); ✉ The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed). One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).