友人
我有以下jQuery ajax Post调用
function submitForm() {
var selectedPricingTierId = "";
var lstIds = new Array();
jQuery('input[type=checkbox]').each(function () {
if(this.checked && this.id !="select_all"){
if(selectedPricingTierId == "") {
selectedPricingTierId = this.id;
} else {
selectedPricingTierId = selectedPricingTierId + "," + this.id;
}
}
});
var dataObj = {
"lstIds" : selectedPricingTierId
};
jQuery.ajax({
url : getCurrentLocation() + "/saveIncentives.action",
type : "POST",
data : dataObj,
success : function(data) {
closeWindow();
}
});
}
现在,我必须将以下隐藏变量传递给我的dataObj
对于如何在Post调用中将上述隐藏变量附加到我的DataObj方面,我一无所知。
请提出合适的方法