How does enterkeyhint work in HTML?

Pressing the inter is something we do all the time – but pressing the inter can do many things. On mobile devices, since the keyboards are not physical, the keys may depend on what we want to do. enterkeyhint Informs the browser what happens when you press Enter (ie send an email) – so that we can display it on the mobile keyboard. For example, if we want to send an email to an intercom, we can use it. enterkeyhint To show the word Send instead of Enter.

An example is shown below enterkeyhint Affects the ‘Submit’ button. You can see that it shows both. Done, And Go It depends on how much we use it. Other browsers can do this in different ways – for example a paper airplane for “send” can be shown on android.

An example of what InterContent looks like on iOS

How InterContent works.

Since you can press Enter at any input on your mobile, you have to enter InterContent at each input. For example, let’s say we have a web sign up form for a newsletter. In that case, we can use enterkeyhint on our email input to display. Send Inter-key space, so users know they’re sending us their data. In HTML, it looks like this:

html Copy
<input type="email" enterkeyhint="send">

When a user is selecting this input, enterkeyhint Will showSend“Instead”Enter

All possible values ​​for InterContent

Below are all possible values. enterkeyhint.

Value Enter text for example.
enterkeyhint = “Search” For Search – This text will show “Search” or the icon representing it.
enterkeyhint = “Enter” Basically generic version – usually indicates a new line or submission.
enterkeyhint = “Next” Icon or text representing the button to go to the next page or input.
enterkeyhint = “Previous” Icon or text representing the button to go to the previous page or input.
enterkeyhint = “Send” It is commonly used to represent sending emails. An email icon or text “Send” will be displayed.
enterkeyhint = “done” Commonly used to indicate the completion of a form. Either show the icon representing it, or show the text “Done”.
enterkeyhint = “go” Indicates to go to the next page. Displays an icon representing either “Go” or the text “Go”

Intercontinental support

enterkeyhint It is now supported in all major browsers, as shown in the table below.

If you want to see the details for enterkeyhint, you can find it here.

.

Write a Comment

Your email address will not be published. Required fields are marked *