Código HTML:
<script language="javascript" type="text/javascript" src="extras/js/jquery/jquery-1.3.2.min.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$('#AddFormulario').submit(function(){
if ($(this).attr("action")==""){
alert("no hay action");
return false;
}else{
$.ajax({
url: $(this).attr('action'),
type:'POST',
data:$(this).serialize(),
});
return true;
}
});
});
</script>
<form method="post" id="AddFormulario" action="">
<input type="submit" value="XD" />
</form>