What I've found helpful for my 5yr is to talk through things for a minute before giving the answer. For example, "if the answer is no, what will you do". "If the answer is yes, what will you do." or "what do you think the answer would be?". Doing a verbal walkthrough of sorts.
Along those same lines, if I know that something may cause a temper tantrum, I'll talk about how this often gets you mad later and then talk about what can be done about it. (changes or even just expectations). I'm doing this with an attitude of helping him understand his emotions and his world, NOT of trying to shame him or blame him for stuff.
Another thing I try is something like "You want this, I want that. What can we do?" and help him to find an idea that will be okay for you and okay for him. Now I'm teaching him negotiation skills that hopefully he'll use with his friends and other relatives.
L.
------
addendum: I wish that more of the responses focused on PREVENTION instead of dealing with the aftermath. I think my job as a parent should focus on teaching how to handle life rather than focusing on consequences for a wrong action. Giving him the tools to realize when he is getting frustrated and then how to calm himself down is a GREAT contribution to all his future relationships. A person who can handle his emotions will do well in work, family and social situations. He knows he's upset, teach him a better way to handle things instead of focusing on what he's doing wrong.
Also, I totally wish that parents wouldn't ignore their children based on behavior. I think this sets up a pattern for a poor dynamic. What kids often hear is that mom (dad) doesn't want to hear bad news and bad attitudes - only good & happy ones. So, fast forward to adolescence and he has a problem. He's learned that mom doesn't want to hear when he's upset about bad news or that mom will just be focused on applying consequences, so he keeps the issue from her. Instead he goes to his peers for advice and counsel instead of his parents who have decades of experience and know him infinitely much better.
IMHO a much better dynamic is to help a child think through his options and what the potential outcomes would be so that he can make a sound decision. If the parent can 'hear' what is trying to be communicated and help that come out better, you're well on the way to open dialog. Granted, in some stages of a meltdown, you just have to wait until feelings subside to be able to talk about something. That's not where I'm suggesting the communication occur, but at *some* point you should HELP the child process his emotions and search for a way to handle things - ideally before or at the earliest stages. Once he has mastered these tools, the outbursts will go away.