Jump to content

  • Free consultations and support
  • Live chatClick Here for Live Chat
  • Call ico 1888-906-1888
    Phone support: Open

    Ready for your call :)

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams

    Phone support: Closed

    We are back in: 1h 20m

    Our business hours:

    Mon — Fri, 2am — 8pm (EST)

    US & EU support teams


Using OnSubmit in JavaScript

javascript onsubmit event

  • Please log in to reply
 

#1 Salwa

Salwa

    Senior Member

  • Designer
  • 181 posts

Posted 18 July 2013 - 09:15 PM

onSubmit event performs a command or a set of commands when a user clicks the submit button on a form.
To use OnSubmit event
1.Create a function to run the specific commands when your form's submit button is clicked. Place the function in your HTML page header section.
function MyFormComm () {
alert('Your Text');
}
This function will make the alert box display when the submit button on your form in clicked (when your submit button code is correct).
2.Now call the function from your HTML page’s tag
< FORM onSubmit="MyFormComm ()" >
< input type=submit >
< /FORM >
  • lalelemu likes this





Also tagged with one or more of these keywords: javascript, onsubmit event

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users