When Cousteau was about 18 months old he developed a terribly annoying habit of barking wildly and jumping at me whenever he wanted something, like the tennis ball or a treat. I read up and realized that Cousteau was doing something called a "demand bark" - essentially demanding whatever it was he wanted by being obnoxious. The best way to deal with this is to ignore the dog during that bad behavior, then redirect or do what the dog wanted when he calms down.
The problem with ignoring the dog is if he doesn't get what he wanted by barking, he's going to continue barking harder and harder and being more and more obnoxious, because barking and being a brat is what worked in the past. Sort of like when my husband tried to control the TiVo when the remote had dead batteries. Pushing the buttons always got what he wanted in the past, so he kept trying it, with slight variations before finally trying something different. The key is to *not* give into the bad behavior while it escalates, since it will eventually stop and the dog will try something new. This is called an extinction burst in the psychology world. If you do give in at the height of the extinction burst, you've made your job that much harder, since you just taught that job that if at first he doesn't succeed, try, try, try again.
Within about 3 weeks, Cousteau stopped demand barking, since every time he barked, I turned my back and walked away from him. He very rarely barks now since sitting politely and looking tends to get him what he wants much more quickly. Don't get me wrong, it was a long 3 weeks. I got several bruises and scratches from his annoying display and the neighbors thought we'd really lost it, but in the end it was so worth it.
Tonight we experienced a case of demand "barking" and an extinction burst with BabyBug. The child is addicted to Elmo, much like I'm addicted to chocolate chip cookies. In both cases, they're wonderful and we'd both indulge all day, but neither addiction is good for us. Bug walked into the living room, sat down, and requested Elmo. I told her "No. No Elmo today." Her Daddy walked into the room and she again requested Elmo. He told her "No. Momma says no Elmo today." From that point on, Bug pleaded, demanded, screamed, and shrieked about Elmo. Over and over ElmoElmoElmoElmoElmoElmoElmo. Then she got crafty and started getting into trouble in the hopes we'd put on Elmo to distract her. That didn't work, so she went back to shrieking Elmo.
This wasn't fun by any means, but there was no reason to turn the TV on in the middle of such a nice day. DH and I kept looking at each other and trying not to grimace or laugh, depending on what method Bug was using to cajole us, but other than repeating "No. No Elmo today." we ignored her.
Finally our persistance paid off and Bug found something else to do. She sorted a toy set for awhile and then brewed some tea for her Daddy and I. Then we read a couple of Elmo books. :) It was a sweet day and we wouldn't have had that if we'd given in let her watch TV. And with any luck, she's starting to learn that when Momma and Daddy say "no", we do mean it. A mom can hope, right?