I was reading that massed foot archers could actually do quite well against horse archers but I don't know if I believe this or rather I guess it would depend on tactics.
I mean when you consider the most common tactic of horse archers, the wheel formation, you have to consider that as the wheel turns only a very small amount of horse archers would actually be in your firing arc at any given time which means even if your volley firing to saturate the horse archers with arrows, your only going to catch a small amount of them with any one volley. Also they are a fast moving target and while you might think it would be easy to take out their horses, a horse is a big animal and unless you hit it just right, a horse would probably be able to take multiple arrows without falling, at least right away. Then add barding to that equation and you have a pretty hard to kill mount.
In contrast to the horse archers though, massed foot archers would be. well, in a stationary mass, basically big, immobile blobs of targets. You really wouldn't have to do much aiming, just point at the mass of foot archers and shoot and you would be bound to hit something.
On the other hand, not all horse archers were created equal. While the Mogols were experts at shooting on the run, The Russian Druzhina and other heavy horse archers would stand stationary and fire arrows at the enemy before charging. I would guess that if your firing into a massed, stationary formation of what might be more closely described as cavalry with bows rather than horse archers, then massed foot archers would probably be a real danger to them.