Tema: Links
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/07/2014, 07:56
soloandroid
 
Fecha de Ingreso: febrero-2013
Mensajes: 264
Antigüedad: 11 años, 2 meses
Puntos: 1
Links

Hola buenas, tengo el siguiente script el cual me lo baje,el script funciona bien,lo malo es que me envia a una web previa, si presiono a un boton me envia a una pagina que me pregunta si quiere que vaya a esa web o no.

Como se puede quitar eso del script para que vaya directo sin preguntar nada ? muchas gracias :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>html 4.01 transitional</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="content-script-type" content="text/javascript">
<script type="text/javascript">
<!--//
function crearlink(Sel){
if (Sel.ad.selectedIndex != 0){
var link = Sel.ad.options[Sel.ad.selectedIndex].value
document.write("<a href='" + link + "'>" + link + "<\/a><br>");
document.write("<a href='javascript:history.back\(\)\;'>volver<\/a><br>");
}
}
//-->
</script>
</head>
<body>
<form action="">
<select name="ad" onchange="crearlink(this.form)">
<option selected> ---</option>
<option value="1.htm">texto 1</option>
<option value="2.htm">texto 2</option>
<option value="3.htm">texto 3</option>
</select>
</form>
</body>
</html>