pero no se como crear y llamar la funcion para las flechas keycode==40 y keycode==38
estaba pensando algo asi como esta funcion pero nose como llamarla en el input del body
si alguien me puede explicar, lo agradeceria
saludos
<html>
<title></title>
<head>
<script src="jquery-1.2.1.pack.js" type="text/javascript"></script>
<script type="text/javascript">
function lookup(inputString) {
if(inputString.length == 0) {
// Hide the suggestion box.
$('#suggestions').hide();
} else {
$.post("rpc.php", {queryString: ""+inputString+""}, function(data){
if(data.length >0) {
$('#suggestions').show();
$('#autoSuggestionsList').html(data);
}
});
}
} // lookup
function fill(thisValue) {
$('#inputString').val(thisValue);
$('#suggestions').hide();
}
</script>
<script>
$('#inputString').keydown(function(e) {
if (e.keyCode === 40) {
// down cursor key was pressed
down = true;
} else if (e.keyCode === 3
![8)](/images/smiles/icon_cool.gif)
// up cursor key was pressed
up = true;
}
});
</script>
</head>
<body>
<input size="30" id="inputString" onkeyup="lookup(this.value);" type="text" />
</div> <div class="suggestionsBox" id="suggestions" style="display: none;">
<div class="suggestionList" id="autoSuggestionsList">
</div>
</div>
</div>
</body>
</html>