How to set "Search" button as default on Enter using Javascript


How To set Default Button for ENTER key pressed event?


Or

Setting enter key default button when login control and search ?



You can submit a form when you enter something in a search field and press Enter (Return) button on keyboard using javascript code.

<input type="text" name="searchFor"
onkeydown="if(event.which || event.keyCode)                                                    {if ((event.which == 13) || (event.keyCode == 13))                                                    {document.getElementById('your search button ID').click/>

Comments

Popular Posts

Apple iPhone sending SMS automatically 00447786205094

GREYCstoration Oil Paint plugin for Photoshop

Security Token Service is not available (I fixed it)

SharePoint online hub navigation not updating for other users

Service Bus Gateway service stuck at Starting