Ciao, ho trovato questo script su internet non ricordo dove.
Codice HTML:
<script type='text/javascript'>
function tasto(tasto_premuto)
{
switch(tasto_premuto.keyCode)
{
case 'a'.charCodeAt(0):
window.location.href='pagina1.php';
break;
case 'b'.charCodeAt(0):
window.location.href='pagina2.php';
break;
case '3'.charCodeAt(0):
window.location.href='pagina3.php';
break;
default:
location.href = "index.php?pag=intro2";
break;
}
}
</script>
Adesso io vorrei fare in modo che alla pressione del tasto A si riproduca un suono. Come faccio?