currently I have the following:
$.ajax({
type: 'POST',
url: this.action,
data: $(this).serialize(),
});
This works fine, however I would like to add a value to data, so I tried
$.ajax({
type: 'POST',
url: this.action,
data: $(this).serialize() + '&=NonFormValue' + NonFormValue,
});
But that didn't post correctly. Any ideas on how you can add an item to the serialize string? This is a global page variable that isn't form specific.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…