Minecraft wiki entry for Spawner_traps, associated text: Zombies: a simple gated fence will do. Maximize your view of the spawner, so that they come to the fence quickly.
Spiders: cover the front with pillars of blocks, floor to ceiling, but with 1-block wide slits open between them. Some glass at the ceiling can keep the spiders from sticking up there out of reach. You can then attack them freely, but they can't come through. To defend against creepers and other non-spider spawns, you can make these slits two-high, between the top and bottom slabs (that is, three blocks total, but with the top and bottom spaces half-blocked by slabs). The "tall" monsters will not recognize these as passable, but you can move or attack through them easily (or you can just put fences and gates to block walking monsters).
Cave spiders: you can place a door between floor-to-ceiling fences (see pictures below). Iron doors are better so that you can't accidentally open them while you're attacking the spiders. Note that cave spider spawners don't come pre-enclosed in a dungeon, so you'll likely need to start by building a room around them. Remember to open up the entire 9x9x3 area so that you don't get snuck up on by spiders spawning in a way that ignores walls. Again, glass can help keep them from climbing out of reach.
Skeletons: are the trickiest, as they can shoot through even brief gaps the moment they get the angle. For the actual killing zone, you want fences/gates at eye level (so they can't shoot you), with an open row below (so you can attack). If you stand directly in front of the fence, they will usually come up to the front so you can attack them. That row in front of the fence can also be a trench—you can reach further into the room, but then they can occasionally get an arrow or two under the fences.