First have a button with type submit as
<INPUT<input TYPE="SUBMIT"type="submit" VALUE="SUBMIT"value="submit" /> In your FORMform tag, include the onSubmitonsubmit() event as
<FORM <form ACTION="action="/path/to/server/side/script" NAME="testform"name="testform" onSubmit="returnonsubmit="return validate()" > The validate() function should return true if the form validation goes through or a false if the validation fails. e.g.
function validate(){ if(...){//valid return true; }else{//not valid return false; } } EDIT: Always specify the button type. If not specified, in IE it defaults to "button" while in Chrome and Firefox it defaults to "submit".
<form action="my/script" onsubmit="return ValidateFunc();"> <button type="submit"> <img src="image/do_this_with_input_tag.png"> Some Text </button> </form> And in future, include more details in your question if you want proper answers.