When your dog has all four paws on the floor, give him attention and praise. If he jumps up at any point, freeze with your arms folded on your chest until he calms down. Instruct guests and all members of your household to consistently ignore jumping. If you have visitors who ignore the no-jumping rules, keep your dog on leash during the visit and gently remove him if he jumps. For anything your dog gets in life, whether it's your attention or a meal, only give the reward when all four paws are on the floor. Jumping up should end all attention and rewards, while remaining fixed on the ground garners all the pleasurable reinforcement a dog desires — treats, petting, play.
Why do dogs jump up? A plausible explanation arises from their ways of communicating with each other. A puppy greeting an adult dog often licks the adult’s muzzle -- a polite, deferential behavior. Dogs, of course, descend from wolves, among whom muzzle-licking is how pups get the grownups to regurgitate food for them. Domestic dogs rarely nourish puppies this way, but muzzle-licking has survived, maybe because deferential behaviors are handy for a social animal. Think of humans saying “No, after you.” Muzzle-licking is also an appeasement behavior -- something you trot out to de-escalate a fight. A human might lift up his hands, palms toward the person he’s arguing with.