A jumping dog is trying to get to your face.
If your dog or any dog you come across are jumping up to you, there are a number of things you can do.
Give them no attention – look at the sky or turn your back on them until they have stopped jumping for at least 10 seconds.
Have them on lead so if they try to jump up at yourself or visitors, you can restrict the length of lead (under your foot if need be) so they are unable to jump up.
Encourage your dog to sit for attention over longer periods of time. This is a much more pleasurable way for your dog to seek attention, so give them some!