我正在尝试序列化表单中的数据,但它不起作用。
manage-user-form是表单的id。
$('#manage-user-form').live('submit',function(e) {
  e.preventDefault();
  var firstname = $("#firstName").val();
  var lastname = $("#lastName").val();
  // this doesn't work
  alert($(this).serialize())
  // this doesn't work
  var d = $('#manage-user-form').find('input,select,textarea').serialize();
  alert(d);
  // this does work
  alert(firstname);
  alert(lastname);
});