//需要在使用函数时传入event关键字
$('[name=lprice]').change(function(event){
        $('[name=lprice]').validate({
            event:event,
        });
    })

在函数中获取

(function ( $ ) {
    var id=33;
$.fn.validate=function(options){
    // This is the easiest way to have default options.
    var settings = $.extend({
        // These are the defaults.
       reg: /^\d+$/,
       msg:'请输入数字',
       //提示span的类型
       noticeclass:'notice',
       event:'',
    }, options );
   
    $val=this.val();
    $val= $.trim($val);
    
$matchra=  $val.match(settings.reg);
this.nextAll().filter('.'+settings.noticeclass).remove();
alert(settings.event.type)

 
  


}
}( jQuery ));

相关文章:

  • 2022-12-23
  • 2021-07-15
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2021-06-17
  • 2022-02-10
  • 2021-06-13
猜你喜欢
  • 2021-09-10
  • 2021-10-19
  • 2022-01-10
  • 2022-12-23
相关资源
相似解决方案