Yes.
Laptop work without a battery, as long as the laptop accepts a standard 110 VAC power cord as input power. Some modern laptops can operate on 120 VAC as well because of their built-in voltage converter circuitry. In fact, some models have a setting that allows the user to select which type of electric current they want to use, making it possible for them to operate exclusively on AC. If you don’t know how to run your laptop this way, search online for directions from the manufacturer. Bear in mind that parts could be at risk if voltage levels are too high or too low. Before switching from battery mode to electric mode make sure that your charger is plugged into an outlet and working properly.