como puedo hacer para q se ponga el foco en la caja de texto, gracias.
Código:
<html>
<head>
<LINK REL="stylesheet" TYPE="text/css" HREF="css/estilos.css">
<script language="JavaScript">
<!--
function pulse(hau,e)
{
var evt = e ? e : event;
var key = window.Event ? evt.which : evt.keyCode;
//alert("He pulsado la tecla: "+key);
if(key==71)
{
location.href='http://www.google.es/';
}
if(key==65)
{
location.href='http://www.alphacom.es/';
}
if(key==89)
{
location.href='http://www.yahoo.es/';
}
if(key==72)
{
location.href='http://www.hotmail.com/';
}
}
//-->
</script>
<DIV ID="Capa" STYLE="position: absolute; left:200px; top:50px; width:700px; height:500px; background-color:#FF0000">
</head>
<body bgcolor="#182345" topmargin=0 leftmargin=0 >
<center><br>
<h1>Presione la Tecla Indicada para ir a la web.</h1><br><br>
<input type="text" onkeydown="pulse(this,event)"/><br><br>
<h2>A = www.alphacom.es <br>
G = www.google.es <br>
Y = www.yahoo.es <br>
H = www.hotmail.com <br></h2>
</center>
</body>
</html>