Instead of worrying there are a few steps you should rush for. Though I wish this never ever happen to anyone but prevention is better than cure and knowing the way how to get out of this issue is always beneficial.
Immediately shut down the laptop take out the battery, adapter and unplug the device. Removing the power source immediately is essential as the contact of liquid and electricity may cause the powered circuit to be burnt.
After having done that immediately turn it upside down to prevent the liquid from going deeper into you notebook.
Try to clean the any part that has been spilt on if you can get to. Try using a soft paper towel or cotton cloth or a good absorbent.
Some keyboards are designed to protect the laptop from such accidental mishaps If try to get the liquid in between the keys.
Try to insulate yourself from the static discharge.
Try disconnecting and removing any external device or gadget connected to your laptop.
If you are comfortable in taking your device apart then do otherwise take it to someone who is comfortable asap. Immediately take out the hard drive. Try to take out as many cards and drives as you can.
Try using a toothbrush or soft cloth to softly take away any dried residue from stains that has been caused by a liquid other than water such as coffee or cola. Puff the residue away with compressed air, or you can also make use of a vacuum cleaner and make sure that you attempt gently and try removing the residue when it has dried to a powder
Try to find out that whether the liquid which has been spilt on is water soluble or is an organic Liquid. In the case of the former, deionized water shall be working fine. In case the liquid is oily, then you should rinse it with denatured alcohol, followed by rinsing it with deionized water.
Rinse with water. Take any components that have residue (a fresh spill or an old spill of cola) and rinse them under the tap. Most circuit boards are able to handle water well, as long as they have not been powered up. There are a few internal components which include moving parts are unable to handle water well like for example fans and CD/DVD drives.
Rinse it with distilled water or deionized water. Most of the person favors to rinse with deionized water over spigot. With Regular water there is chance of having deposits left that might result into short-circuiting, but deionized water will be rinsing clean, dry, and nothing will be left behind.
Try to remove excess of water.
Be absolutely sure that all the parts are dry before you continue. As with rinsing, there are diverse theories on drying:
Let it get dried naturally. Support the machine up, from surfaces, so that air can circulate in and around the complete unit. Leave it as it is for the next one or two days.
Dry with light heat: Place it out of the place where it can get sunlight directly–close to some other source of warmness. Make sure that you don’t use high levels of heat; moderately warm sources of heat will be working fine. Leave it to dry for next half day; a dehumidifier placed near it may perk up drying time. You must know that the High heat will take the dampness further deep inside the appliance and that moisture will be causing the oxidation and corrosion.
In my opinion you should possibly avoid the use of a hair dryer, this might bring in the further issues and fill your gadget with more contaminating objects and dust particles. A hair dryer at set at high levels might also cause some of the plastic components to melt. In intense cases the hair dryer will be driving the moist deeper into the circuitry and that dampness will oxidize and create capacitive load connections under and inside of integrated circuits and connectors, ultimately leading the failure of the device.
The most efficient way to eliminate all remaining moisture is to have patiently draw it away with a vacuum cleaner held over the areas that has been affected, for up to 20 minutes in each reachable region, having previously removed the majority of liquids and moisture manually and dried all visible moisture by hand, so that none enters the vacuum cleaner. This method is desirable to leaving it to dry naturally as it prevents any further oxidation from happening deep inside small surface mount components and connections, such as can result in issues later on.
Hope this information was useful to you! :)