开发者

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();
    }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜