I have a search field:
<div class="search-fill">
<input type="search" name="search" id="search" class="autocomplete" autocomplete="off" placeholder="Search..." value="@ViewBag.Terms"/>
</div>
and a button related to it:
<div class="search-submit">
<button id="searchbutton" class="search-button"><i class="fa fa-search" onclick="removeSpecialChar()"></i></button>
This code does not help when the user presses the Enter key. I know we can disable the Enter through preventDefault(), but is there any other way to do this, as I want the user to be able to search even on clicking Enter?