If a ball bounces before it crosses the plate and is batted into fair territory is it a hit?

If the ball lands in the dirt and the batter swings at it, I believe that is a strike, even if he hits it into fair territory. This is another one that may have to be improved by somebody else if I'm wrong, but I don't think I am on this one.