Onclick form submit using mootools
I am using JQuery onclick submit event like t开发者_如何学运维his
<script type="text/javascript">
$(function(){
$('#button').click(function(){
$('#form').submit();
return false;
});
});
</script>
I want to do it with mootools.
Thanks
Solved
Using mootools addEvent
$('button').addEvent('click', function(){
$('form').submit();
});
If #button
is a submit, you can always do the following:
$('form').addEvents({
submit: function(){
this.submit();
}
});
精彩评论