Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/09/2014, 22:22
bestwish
 
Fecha de Ingreso: marzo-2009
Mensajes: 13
Antigüedad: 15 años
Puntos: 0
abrir pestaña y ventana nueva del navegador con javascript

hola, tengo el siguiente código:

<!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=utf-8" />
<title>Uso de enlaces</title>
<script language="javascript">
function NewsWindow(){
fin=window.open("","NUEVA","width=400,height=400") ;
}
</script>

</head>

<body>
<p><a href="JavaScript:NewsWindow()">Abrir ventana</a></p>
<p><a href="http://www.google.com" target="NUEVA">Abrir pesta&ntilde;a</a></p>

</body>
</html>


pero curiosamente, solo se hace una cosa a la vez (Si abro una pestaña, ya no se ejecuta la apertura de la nueva ventana... y viceversa)

¿A qué se debe esta característica de JavaScript?