Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/03/2015, 15:29
randyd256
 
Fecha de Ingreso: marzo-2015
Mensajes: 1
Antigüedad: 9 años, 2 meses
Puntos: 0
Enviar datos entre ventanas en tiempo real

Buenas noches, tengo una duda, espero que me podáis ayudar.

Probar el código. me gustaría saber la manera de hacer lo mismo pero de una ventana a otra.

Espero que me podáis ayudar,

Gracias

Código HTML:
<!DOCTYPE html>
<html>

<head>

<style type="text/css">

body{

}
#div1{
 width:100%;
 height:650px;
}

textarea{
 border-style:none;
 width:500px;
 height:650px;
 float:left;
 margin-right:50px;
 margin-left:100px;
}

#salida{
 width:500px;
 height:650px;
 background-color:white;
 float:left;
}

</style>

<script type="text/javascript">

function escribir(){

 texto=document.getElementById('editor').value;

 document.getElementById('salida').innerHTML=texto;

}
</script>

</head>

<body>

<h1 style="text-align:center;font-family:Arial,Helvetica,sans-serif;"></h1>

<div id="div1">

<textarea id="editor" value="letra" onkeyup="escribir()" placeholder="Escribir aqui" title="Codigo fuente" autofocus="autofocus"></textarea>

<div id="salida" title="Salida"></div>
</div>

</body>

</html>