Although unsavory, a child will spit for a variety of reasons beyond just mimicking someone he knows or even someone on television. According to the AskDrSears website, young children spit as a way to show frustration, gain attention or simply because they thinks it's humorous. As a parent, you should simply treat spitting like any other unwanted behavior, including hitting, biting and screaming. Try to understand the reason for the spitting and then set an age-appropriate consequence for continuing the behavior.
Set a positive example for your child by not spitting yourself. Explain to your child that under certain circumstances spitting is OK, such as if you need to spit some food out in your napkin if it tastes bad or you can't chew it. However, let him know that it's never acceptable to spit if you're angry, sad, frustrated or want a parent's attention.
Watch your child closely and the instant you notice him spitting, take him away from the situation and explain that his behavior isn't acceptable. For example, tell him, “Spitting is rude. When you spit, you are not being polite. Spitting is completely unacceptable.”
Help your toddler or preschooler find an alternative outlet if he's spitting out of frustration or anger. For instance, if he cannot verbalize being angry if a sibling takes his favorite toy, show him another way to react to the situation, such as coming to you or teaching him words to express his feelings, such as “angry” or “sad.”
Explain the consequences of spitting to your child. Let him know that you will warn him the first time he spits for the wrong reason, but if he does it a second time, there will be a consequence. Set the consequence dependent on his age. For example, you might have him sit in a timeout for one minute for every year of his age, or you might give him a towel and tell him he has to clean up his saliva.
Praise your child each time she expresses her anger or frustration appropriately without spitting. If she was spitting for attention, give her positive attention for not spitting by telling her directly that you're proud of her because she is no longer trying to get your attention by spitting.
Speak to your child's pediatrician if she continues to spit, or is spitting for no verifiable reason, such as just to make her siblings laugh or because she's angry. Your child might have a digestive issue that is causing her to habitually spit, such as a reflux disorder.