<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
</head>
<body>
<form action="" method="GET" id="form1">
<input type="text" name="inp1" onkeydown="checkKey(event)" id="inp1" />
</form>
<script type="text/javascript">
function checkKey(e) {
var inp = document.getElementById('inp1');
if(e.keyCode == "13") {
document.getElementById('form1').submit();
}
}
</script>
</body>
</html>