1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
<html>
<head>
<script language="JavaScript">
var textareaFocus = false;
function access(pEvent,type)
{
if (!textareaFocus)
{
if(pEvent.keyCode==67){
document.location.href='index.html?page=caserne'
}
if(pEvent.keyCode==84){
document.location.href='index.html?page=truc'
}
if(pEvent.keyCode==66){
document.location.href='index.html?page=bidule'
}
}
}
function gestionTextarea(mode)
{
textareaFocus = mode;
}
</script>
</head>
<body onkeydown="access(event);">
<u>C</u>aserne<br><br>
<u>T</u>ruc<br><br>
<u>B</u>idule<br><br>
<textarea onfocus="gestionTextarea(true)" onblur="gestionTextarea(false)" rows='4' cols='50'></textarea>
</body> |
Partager