Not much of a precedent. In WWII, we were up against a genuine Axis. There was a formal alignment of power between Germany and Japan, so when Japan attacked us, we were effectively at war with the Axis.
Moreover, Germany was actively at war with allies we would depend on in fighting the Japanese. From that perspective, it made sense to decide which was the more dangerous of our two main foes and focus on them first, while merely keeping the other in check. By comparison, there was no Axis between Al Qaeda and Saddam Hussein's regime. In fact, they were quite at odds.
A closer precedent would be if, in 1941, we were attacked by Japan and so we turned our attention to invading Spain (which shared some of Japan's fascist idealogy, but wasn't formally aligned with them, nor was it at war with our allies). Heck, even that's a pretty forgiving analogy, since Spain and Japan were more idealogically in tune, back in 1941, than Al Qaeda and Iraq were in 2003. Hussein ran a mostly secular, Stalinist dictatorship and nepotistic kleptocracy, which was largely isolated from the wider Muslim world, and which was driven primarily by nationalist, tribal, and ethnic impulses. Al Qaeda, by comparison, was a extremist religious organization that was anti-nationalist in its outlook (operating in a cellular fashion multinationally and multiethnically).
So a much better precedent would be if, in 1941, we were attacked by Japan and so we turned our attention to invading and occupying El Salvador. El Salvador in 1941 was run by a brutal dictator, like Iraq in 2003, but it didn't have any significant involvement with Japan of 1941, any more than Iraq had with Al Qaeda in 2003.
But, of course, America was run by sane people back in 1941, so when we were attacked by Japan, we focused on the matter at hand, rather than getting distracted by some frivolous pet war with El Salvador.