In the movie Jurassic Park, a Dilophosaurs spits venom in a man's face. Alas, there is no physical evidence that dinosaurs could spit. It takes a lot of muscle to spit and that probably would have left marks on the skeletons of dinosaurs.
There are snakes such as the Spitting Cobra that appear to spit venom, but they really just spray their venom. The have large muscles that allow them to eject venom quite accurately.
Check out this video of a spitting cobra, well spitting. It is under two minutes and very well done.