开发者

what's the difference between using jquery .submit() and a jquery form plugin?

I've seen a lot of members 开发者_开发问答of this community recommend something like this:

$('#form').submit(function(e){

  $.ajax({
    url:"script.php",
    type: 'POST',
    success:function(data){
      // data returned from php
    }
  });

  return false;

});

It seems lightweight, easy to understand and easy to use.

My question: how is the jquery form plugin useful, if this all can be done that easily?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜