Sounds simple right? The key to making this work is to work so quickly that at first your dog doesn't have the opportunity to even think to jump up. At first the only thing keeping their paws on the ground is your rapid fired treats thrown to the ground. after 10 rapid fire treats give your dog a few seconds to look up at you and remain with four on the floor. Slowly start to build the amount of time between treats. If you have taught sit chances are your dog may default to that, this is a jackpot moment. Use aleash tied to something, this will allow you to back up out of your dog's reach if they do forget and jump up on you. This is a punishment since you are removing something your dog wants (You). If your dog likesto jump up or mouth you when being pet you can also mark and reward the absence of that behavior.
This works for many unwanted behaviors. Does your dog bark? Reward quiet. See my blog on using kongs to reward quiet. Does your dog mouth you? Bite the leash? Pull on leash? Chase the cat? Rewarding your dog when they are not doing these behaviors will lead to success. Set your dog up to get it right and make it worth their while. Check out this video of me rewarding the "nothing" to help Dex learn to stop jumping.