My DD went thru this stage at about 12-15 months. What I did was I would yell loudly "OUCH" if she bit or hit me. This was intended to startle her. Then I would set her down, say firmly "No biting/hitting" and walk away from her, intended to show that whatever fun we were having would abruptly end and she would not receive my attention if she was going to hit or bite. If she followed after me I would gently ignore her for a minute or so, in other words I was much too preoccupied with whatever I started doing and would not speak to or look at her. Only for a minute though.
Now that she is older, 2 years, I would give immediate time out for that kind of behavior. Most things get a warning first, like not listening, but hitting and biting get instant time out. She doesn't do it anymore though, it was really a short phase that only lasted a month or two. Good luck.
at 12:34 PM on Jan. 6, 2011