Tengo estos script a modo de ejercicio...
el problema es que se ejecuta solo 2 veces y la 3ra ves arroja un error javascript...
Errores de script de página web:
Agente de usuario: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; InfoPath.2; .NET CLR 2.0.50727)
Fecha: Fri, 10 Jul 2009 12:09:12 UTC
Mensaje: Expected ']'
Línea: 1
Carácter: 16
Código: 0
URI:
http://localhost/test/relojes.php
alguna idea de como podria solucionar esto?
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
<script type="text/javascript">
function fnHide(id){
window.setTimeout("fnHide(" + id + ")", 1000);
fnHide2(id);
}
function fnHide2(sID){
var o = eval(sID);
o.innerHTML += "cualquiercosa";
}
</script>
</head>
<body>
<div id="algo" style="display:;">algo</div>
<input type="button" value="Count Down"
id="oHideButton" onclick="fnHide('algo')">
</body>
</html>