While melee units will attack enemies in range.
Ranged attackers who are webbed will not attack. Similarly, melee units will not use any spells they have (e.g. fire / lightning shrills casting their ranged attack).
I have not had the opportunity to use web on spellcasters such as Haunters, ghosts, and wildling/darkling shamans yet, but will update this post later if I meet some.