#1
[Código Javascript] Abrir boton en misma ventana o aparte el Sáb Feb 07, 2009 6:03 pm
[Código Javascript] Abrir boton en misma ventana o aparte el Sáb Feb 07, 2009 6:03 pmMenú desplegable con la opción de abrir la web seleccionada en una ventana aparte.
PARA AGREGA OTRO PONE ESTO.
:cheers: :cheers: :cheers:
- Código:
<form name="mycombowopt">
<select name="example" size=1>
<option value="LA WEB AQUI">TEXTO AQUI</option>
<option value="LA WEB AQUI">TEXTO AQUI</option>
<option value="LA WEB AQUI">TEXTO AQUI</option>
</select> <input type="button" value="Vamos!" onClick="gothere()"> <br>
<input type="checkbox" name="windowoption" value="ON">Abrir en ventana aparte</p>
</form>
<script language="javascript">
<!--
function gothere(){
var thebox=document.mycombowopt
if (thebox.windowoption.checked){
if (!window.newwindow)
newwindow=window.open("")
newwindow.location=
thebox.example.options[thebox.example.selectedIndex].value
}
else
location=
thebox.example.options[thebox.example.selectedIndex].value
}
//-->
</script>
PARA AGREGA OTRO PONE ESTO.
- Código:
<option value="LA WEB AQUI">TEXTO AQUI</option>
:cheers: :cheers: :cheers:








Mensajes
Reputacion
Puntos
Localización
Edad




