Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/01/2010, 02:24
makh16
 
Fecha de Ingreso: enero-2009
Mensajes: 213
Antigüedad: 15 años, 4 meses
Puntos: 0
-ayuda-unterminated string literal

Hola a todos!

Tengo esta función en javacript pero no se porque no funciona. Miré a la consola de errores y me dice esto "unterminated string literal". A ver si alguien sabe decirme como solucionarlo, este es el código:

Código:
<script language="javascript">
function prueba()
{
nombre="Holaa";
	no="<table width='100%' border='0' align='center' bgcolor='#f90'>
          <tr>
            <td colspan='3' align='center' bgcolor='#999933'>
			<h2><strong>"+nombre+"</strong></h2>
			</td>
            </tr>
        </table>";
		document.getElementById('nombre1').innerHTML = no;
}
</script>
y me peta en esta linea:
Código:
no="<table width='100%' border='0' align='center' bgcolor='#f90'>