插件内容:

(function($) {
$.fn.getRealInputValue = function() {
var params = {};

this.each(function() {
var placeholder = $(this).attr('myplaceholder');
var input = $(this);

if (input.hasClass('text-placeholder')) {
params[input.attr('name')] = '';
} else {
params[input.attr('name')] = input.val();
}
});

return params;
}
})(jQuery);

 

调用方式:

var params = $('form#invite-code-form :input').getRealInputValue();

相关文章:

  • 2022-02-15
  • 2022-12-23
  • 2022-01-11
  • 2022-12-23
  • 2022-01-10
  • 2021-12-16
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-12-18
相关资源
相似解决方案