Mitul Dabhi
answered Nov 30 '-1 00:00
event.keyCode is equal to 13 means user pressed enter button
<form method="get" action="">
<input type="text" id="keyword" onkeydown="if (event.keyCode==13) {onenter(this);}" name="keyword" class="form-control" placeholder="Search here">
</form>
<script type="text/javascript">
function onenter(d){
var site_url = 'http://example.com';
var d=jQuery(d).val();
window.location=site_url+'search/'+d;
}
</script>
and we are manually redirecting site with search keyword it is same as form submit