If the charger is good, the battery may not be. If they are both good, the motherboard has a big problem. You need a multi-meter to check the power output of the charger. The battery is too complicated for me to explain how to test it, just try replacing it with one off ebay. If it still doesn't charge, it's the motherboard. That I can tell you can't replace on your own. It would be cheaper to replace the laptop & have all your critical files transfered.
Answers & Comments
My cq20 laptop turn off after i switch on for a few minutes
If the charger is good, the battery may not be. If they are both good, the motherboard has a big problem. You need a multi-meter to check the power output of the charger. The battery is too complicated for me to explain how to test it, just try replacing it with one off ebay. If it still doesn't charge, it's the motherboard. That I can tell you can't replace on your own. It would be cheaper to replace the laptop & have all your critical files transfered.