<html>
<body>
<input type="text" id="url" />
<script type='text/javascript'>
var input = document.getElementById('url');
input.onkeydown = function(e) {
var key = e.keyCode || e.which;
if (key == 13) {
console.log("enter");
window.location = input.value;
}
};
</script>
</body>
</html>