Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

submit form on ctrl enter

form.addEventListener("keydown", (event) => {
  if ((event.keyCode == 10 || event.keyCode == 13) && event.ctrlKey) {
    if (validateForm()) { // validation refer to if user's enter data is correct or not
      alert("ALL fields are filled");
    }
    alert("Looks like you have not filled the form");
  }
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: copy multi cell value from one sheet to another using google app script 
Javascript :: Plumsail set form lookup field value on form load 
Javascript :: copy value from one sheet to anotehr 
Javascript :: angularjs smooth scroll css 
Javascript :: uncheck all other checkboxes when one is checked 
Javascript :: html vue input enabled 
Javascript :: realtime database get by field 
Javascript :: get number value from input e.target.value instead of string 
Javascript :: Pointing Subdomain To A Next.js Page On Vercel 
Javascript :: How to lock thread in javascript energy efficient 
Javascript :: javascript Vue Component Loading Before Vuex Data Is Set 
Javascript :: ziggy vue 3 
Javascript :: how to change css of menu when scrolling 
Javascript :: js read html file 
Javascript :: AngularJS stuck in module 
Javascript :: How to merge array into JSON array 
Javascript :: React Native Swift Escaping closure 
Javascript :: Target one specific Jquery Data Table theader for CSS styles 
Javascript :: How to change a key value pair within a nested json structure C# 
Javascript :: Pass 3 of the same thing to ExpressJS with a form 
Javascript :: react native communications 
Javascript :: Simple Mustache.js 
Javascript :: Uncaught (in promise) TypeError: dispatch is not a function 
Javascript :: controllare che ci sia un file in javascript 
Javascript :: ngrx angular Cannot add property 0, object is not extensible 
Javascript :: sol.common.MapTable elo 
Javascript :: board in javascript 
Javascript :: what does the symbol function do in javascript 
Javascript :: console.log(number++); console.log(++number); console.log(number); 
Javascript :: problem with Next.js and @material-ui. 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =