Fight back if you're attacked. While the normal behavior of crocodilians is to bite a potential meal (you) and hold on until forcibly removed, they will sometimes (particularly when defending young or territory) deliver a single, quick defensive bite and then immediately let go. If this occurs, just try to get away from the animal as quickly as possible. In predatory attacks, however, as well as in some defensive attacks, the animal doesn't let go and will often try to drag a person into the water or underwater. Crocodilians can stay underwater for much longer than humans can, so the only hope of survival if you're attacked in this manner is to fight back and get away. Simply struggling and trying to pull free is usually futile and may induce the animal to go into an underwater death roll, during which an arm or leg stuck in the crocodile's mouth will likely be ripped off. A purposeful, deliberate attack on the animal is therefore a better option.
Go for the eyes. The most vulnerable part of a crocodile's or alligator's body is its eyes. Try to hit or poke the eyes with whatever you have handy: an oar, a stick, or a knife. Even your hands can be effective weapons if you can hit the animal's eyes. A Florida teenager recently escaped an alligator that had dragged him into the water by jamming his thumb into the alligator's eye.
Go for the nostrils or ears. While not as sensitive as the eyes, the nostrils and ears can be effectively attacked. A hard blow or a cut to either of these areas may cause the animal to release you. Many people have been saved from a crocodile's or alligator's jaws when other people have hit the animal's snout with a pole or club.
Go for the palatal valve. Crocodilians have a flap of tissue behind the tongue that covers their throats when they submerge in water. This flap prevents water from flowing into their throats and hence prevents the crocodile from drowning when its mouth is open. If your arm or leg is stuck in a crocodile's mouth, you may be able to pry this valve down. Water will then flow into the crocodile's throat, and animal will most likely let you go. Hard strikes to this valve may also cause the animal to release you.
Get medical attention promptly. A crocodilian's mouth harbors a tremendous amount of bacteria, and infection is almost guaranteed if a bite is not treated promptly.
(An excerpt from http://www.wikihow.com/Survive-an-Encounter-with-a-Crocodile-or-Alligator)