Most laptops today use lithium Ion (Li-ion) batteries. Overcharging Li-ion batteries is not a problem and does not affect the battery life span. These batteries can be charged 300 to 500 times, and they have an internal circuit to stop the charging process at full charge. The control system prevents overcharging, which can cause the lithium ion battery to overheat and potentially burn. This is why the Li-ion batteries are more expensive. The only way for the Li-ion battery to overcharge is if the charging system malfunctions, and then the battery will heat up while in the charger. If you don't plan to use your laptop for long period of time, you can extend the life of your lithium ion laptop battery by storing it with a 50 percent charge. A fully discharged battery left for a long period of time will lose its charging capacity. Fully charged batteries discharge when they are left unused, and will lose effectiveness. This is why it is recommended to discharge a Li-ion battery until it is almost out before shutting down. Running a Li-ion battery down completely will diminish capacity. Keep the battery in a cool place and do not store your computer for a long period of time while it is fully charged.
Older laptops use Nickel-cadmium (Ni-Cd) and Nickel Metal Hydride (Ni-MH) batteries. They require more maintenance than Lithium Ion batteries. They must be fully discharged and then fully recharged so that they don't lose battery life. These batteries can be overcharged only if they go through too many cycles of charging and discharging, which reduces their effectiveness and capacity. It is better to charge all batteries fully before use; then use on battery power until the optimum level for each battery type is reached, before recharging.