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

GREYCstoration Oil Paint plugin for Photoshop

Service Bus Gateway service stuck at Starting

PowerApps SubmitForm not clearing People Picker value

Apple iPhone sending SMS automatically 00447786205094

Download file failed signature verification and may have been tampered with - Workflow Manger 1.0 Refresh (CU2)