0

This is my code :

<input maxlength="10" type="text" onclick="check()" onkeypress="check()" onkeypress="check()" required="true" class="form-control form-control-solid placeholder-no-fix" name="contact" placeholder="Ex: 9923548879">

I want to implement, 2 function in the onclick event like..

onclick="check()" & onclick="get()"

How to do? so because, if the do so, 1 function get overridden by another

Ajay2707
  • 5,690
  • 6
  • 40
  • 58

3 Answers3

1

try this

 <input id="btn" type="button" value="click" onclick="check(); get();"/>
SAUMYA
  • 1,508
  • 1
  • 13
  • 20
0

Try this.

function check(){
  // your code

  get()// call your second function

 }
tamil
  • 108
  • 1
  • 1
  • 7
0

As you want, you just write near the first function as describe in below links.

How to call multiple JavaScript functions in onclick event?

Call two functions from same onclick

onClick="doSomething();doSomethingElse();"

Also check this link :- How to call two methods on button's onclick method in HTML or JavaScript?

Community
  • 1
  • 1
Ajay2707
  • 5,690
  • 6
  • 40
  • 58