<html>
<head>
<title>asd</title>
<script language="javascript">
function aa()
{
if (event.keyCode == 13)
{
if (event.srcElement.type != 'button')
{
event.keyCode = 9;
}
else
{
alert('button');
}
}
}
document.onkeydown = aa;
</script>
</head>
<body>
<form>
<input id='a' type="text" value='a'/>
<input id='b' type="text" />
<input id='c' type="button" />
<input id='d' type="text" />
<input id='e' type="button" />
</form>
</body>
</html>