Data in jQuery ajax()
function accepts anonymous objects as its input, see documentation. So example of what you're looking for is:
dataString = {key: 'val', key2: 'val2'};
$.ajax({
type: "POST",
url: "script.php",
data: dataString,
cache: false,
success: function(){
alert("OK");
}
});
You may also write POST/GET query on your own, like key=val&key2=val2
, but you'd have to handle escaping yourself which is impractical.