Retrieving HTML input maxlength

Retrieving HTML input maxlength

Hi.  I would like to pass the maxlength of an HTML input field as a variable with the $.getJSON function.  Here is my current code:

  1. $.getJSON('SVRPGM',{size: '4'}, function(j){
  2. ...
  3. }

I would like to replace '4' with something like $(this).maxLength().  Is this possible?