Soak up as much wetness as possible with a towel. Then apply a solution of warm water and dish soap. Remove soap residue with a damp towel; blot. Repeat if necessary. Or try Shaw R2X Carpet Stain & Soil Remover ($10 for 32 ounces, shawfloors.com).
For more help, see how to remove milk stains from carpet.