document.onkeydown

document.onkeypress

document.onkeyup

<iframe align="top" height="30" name="KEY_1" scrollbars="0" scrolling="no" src="" width="100"></iframe><br />
<br />
document.onkeypress
<iframe align="top" height="30" name="KEY_2" scrollbars="0" scrolling="no" src="" width="100"></iframe><br />
<br />
document.onkeyup
<iframe align="top" height="30" name="KEY_3" scrollbars="0" scrolling="no" src="" width="100"></iframe><br />
<br />


<script>
function Fkeydown() {
KEY_1.document.close();
KEY_1.document.write("<font size='3' color='Blue' VALGIN='top' >" );
KEY_1.document.write(event.keyCode);
}
document.onkeydown=Fkeydown;


function Fkeypress() {
KEY_2.document.close();
KEY_2.document.write("<font size='3' color='Blue' VALGIN='top' >" );
KEY_2.document.write(event.keyCode);
}
document.onkeypress=Fkeypress;


function Fkeyup() {
KEY_3.document.close();
KEY_3.document.write("<font size='3' color='Blue' VALGIN='top' >" );
KEY_3.document.write(event.keyCode);
}
document.onkeyup=Fkeyup;
</script>

| CSS | HTML | document.onkeyup | document.onkeypress | document.onkeydown | VALGIN | scrolling | scrollbars | align |

全站熱搜

c8cc168 發表在 痞客邦 留言(0) 人氣()