Ver Mensaje Individual
  #5 (permalink)  
Antiguo 01/05/2011, 06:40
Nexus10
 
Fecha de Ingreso: febrero-2010
Mensajes: 295
Antigüedad: 14 años, 2 meses
Puntos: 58
Respuesta: ¿¿Salto de linea en IE??

Nada, no hay manera, no me hace el salto de linea en IE. Lo que he hecho es lo siguiente:

Código HTML:
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Untitled Document</title>
  <script type="text/javascript">
      function Escribir()
      {
         var horaini = document.getElementById("hora_ini").options[document.getElementById("hora_ini").selectedIndex].value;			
         var horafin = document.getElementById("hora_fin").options[document.getElementById("hora_fin").selectedIndex].value;			
         var prob = document.getElementById("prob").options[document.getElementById("prob").selectedIndex].value;			
         var texto = document.getElementById("texto").value;
						
         var mensaje = "MENSAJE:\r\n" + "\r\n" + horaini + " - " + horafin + " HORAS\r\n" + prob + "% " + texto;			
			
         document.getElementById("mensaje").innerHTML = mensaje;
      }
      </script>
</head>
<body>		
   <div id="principal">			
      <div id="cabecera"></div>		
        <form id="form" name="form" action="tratar.php" method="post">	
           <div id="izquierda">              	
             <div id="intervalo">					
	 <label>Hora ini:</label>
	 <select id="hora_ini" name="hora_ini">
	    <option value=""></option>
	    <option value="00">00</option>
	    <option value="06">06</option>
	    <option value="12">12</option>
	    <option value="18">18</option>
	    <option value="24">24</option>		
	 </select>
	 <label>Hora fin:</label>
	 <select id="hora_fin" name="hora_fin">
	     <option value=""></option>
	     <option value="00">00</option>
	     <option value="06">06</option>
	     <option value="12">12</option>
	     <option value="18">18</option>
	     <option value="24">24</option>				
	 </select>
	 <label>Prob.:</label>
	 <select id="prob" name="prob">
                   <option value=""></option>
	   <option value="0">0</option>
	   <option value="50">50</option>
	   <option value="100">100</option>				
	</select>
	<label>Texto:</label>
	<input id="texto" maxlength="50" size="30" name="texto" value="" type="text" />				
             </div>
             <div id="generar">
	 <button type="button" name="generar" onClick="Escribir()">Generar</button>
              </div>						
           </div>		  
           <div id="derecha">		  	  
                 <textarea id="mensaje" name="mensaje" rows="20" cols="50"></textarea>
           <div id="div_submit">
	<button class="botonera" type="submit">Enviar</button>	    
           </div>
        </div>
    </form>	  		  				
  </div>	   
</body>
</html> 

Simplemente se seleccionan los datos, se escribe un texto y se da a generar para que aparezca en el textarea. El texto debería verse así:

MENSAJE:

00 - 06 HORAS
50% TEXTO

En firefox y chrome se ve bien, pero en IE me sale el texto corrido.

Por favor, ¿alguien podría comprobar si le funciona en IE?. Tengo IE9.