function show(){
alert('ASCII代码是:'+event.keyCode);
}
</script>
<body onkeydown='show()'>
***************************
只能是IP地址
程序代码:
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=gb2312'>
<meta name='GENERATOR' content='Microsoft FrontPage 4.0'>
<meta name='ProgId' content='FrontPage.Editor.Document'>
<style>
.a3{width:30;border:0;text-align:center}
</style>
<script>
function mask(obj){
obj.value=obj.value.replace(/[^\d]/g,'')
key1=event.keyCode
if (key1==37 || key1==39)
{ obj.blur();
nextip=parseInt(obj.name.substr(2,1))
nextip=key1==37?nextip-1:nextip+1;
nextip=nextip>=5?1:nextip
nextip=nextip<=0?4:nextip
eval('ip'+

