JS code associated with button and enter key


Copy code

The code is as follows:

<script language=’javascript’>
function onEnterDown(){
if(window.event.keyCode == 13){
function onButOk(){
Button events;
<body onkeydown=’onEnterDown();’>
< input type = “button” accessKey = value = login “onclick =” onbutok() “/ >

Recommended Today

Explain module, import and export in JavaScript

Author: Tania rascia Crazy technology house Original text:https://www.taniarascia.com/j… In the era of the Internet, websites are mainly developed with HTML and CSS. If you load JavaScript into a page, it usually provides effects and interactions in the form of small fragments. Generally, all JavaScript code is written in a file and loaded into a filescriptTag. […]