I have tried to search it but no favorable results found.
I don't use JQuery and I want to make it with pure JavaScript. I want to make the same as <form onsubmit="somefunction();">
but directly from JavaScript.
Something like:
if(document.getElementById("myid").ISSUBMIT) {
somefunction();
}
in Jquery I can make it with on.submit
, but how to do in JavaScript?
Thanks a lot!