jQuery override $.post function

前端 未结 2 1962
故里飘歌
故里飘歌 2021-01-19 07:11

First of all I apologize for my poor english... Hope someone will understand my question and help me...

I\'m working on a project using lots of $.post call and I wan

相关标签:
2条回答
  • 2021-01-19 07:50

    You can create a jQuery-Plug which does the validation and then posting the data to the Server. The basics can be found in the jQuery tutorial.

    0 讨论(0)
  • 2021-01-19 07:58
    $.post = function() {
      var _method = $.post;
      // do something you want
      console.log("do someting");
      return _method.apply($, Array.prototype.slice.apply(arguments));
    }
    
    0 讨论(0)
提交回复
热议问题