html - Can you execute two javascript functions with one submit button -


i have 2 different option boxes in form , 2 different scripts pull data on click how execute both scripts or not work?

<input class="form-control" type="button" onclick="fun() && fun2()" value="submit"> 

yes, make it

<input class="form-control" type="button" onclick="fun(); fun2();" value="submit"> 

or can call 1 function call both of them

<input class="form-control" type="button" onclick="fun();" value="submit">  function fun() {   fun1();   fun2(); } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -