How TO — Remove a Class
Learn how to remove a class name from an element with JavaScript.
Remove Class
Step 1) Add HTML:
In this example, we will use a button to remove the «mystyle» class from the
Example
Step 2) Add CSS:
Style the specified class name:
Example
Step 3) Add JavaScript:
Example
Cross-browser solution
Note: The classList property is not supported in Internet Explorer 9. The following code will work in all browsers:
Example
Tip: Also see How To Toggle A Class.
Tip: Also see How To Add A Class.
Tip: Learn more about the classList property in our JavaScript Reference.
Tip: Learn more about the className property in our JavaScript Reference.
COLOR PICKER
LIKE US
Get certified
by completing
a course today!
CODE GAME
Certificates
Report Error
If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:
Thank You For Helping Us!
Your message has been sent to W3Schools.
Top Tutorials
Top References
Top Examples
Web Courses
W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.
How to Remove Paint from Windows
Last Updated: August 26, 2020 References Tested
This article was co-authored by our trained team of editors and researchers who validated it for accuracy and comprehensiveness. wikiHow’s Content Management Team carefully monitors the work from our editorial staff to ensure that each article is backed by trusted research and meets our high quality standards.
There are 27 references cited in this article, which can be found at the bottom of the page.
The wikiHow Video Team also followed the article’s instructions and verified that they work.
This article has been viewed 497,024 times.
Whether you accidentally got some paint on the window pane during your latest painting session or are looking to refinish old windows, knowing how to remove paint will come in handy as you work on home improvement projects. Take the time to prep the paint the right way to make the removal process that much easier, and be patient as you work on cleaning up the windows. It may take a little bit of time and elbow grease, but you can do it!
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Tip: If you don’t have a glass measuring cup, a microwave-safe glass bowl will work just as well.
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Tip: Take this opportunity to wipe down the interior of the microwave. The steam from the white vinegar will loosen up any stains or baked-on foods, making them easier to clean up.
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Tip: Use a new razor for this task. Old razors are much more likely to scratch the glass.
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Warning: Always read the manufacturer’s instructions before you begin using this kind of product. Some brands may have different instructions about timing or application that you will need to follow.
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Working with Lead Paint: Lead paint is most commonly found in homes built prior to 1978. Make sure you cover any carpet with a taped-down tarp so the dust from the paint doesn’t get into it. Use a respirator, goggles, and shoe covers, and use a shop vac to thoroughly clean up the removed paint and dust from the floor and window sill. [16] X Research source
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Tip: Wear long sleeves and pants to protect your skin from spills and drips.
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
\u00a9 2021 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. This image is not licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n
Related wikiHows
About This Article
To remove paint from window glass, start by heating 1 cup of white vinegar in the microwave for 30-60 seconds. Next, dip a clean rag into the warm vinegar and saturate the paint with the solution. Don’t worry if the paint doesn’t come off yet! Then, saturate the paint with warm, soapy water to loosen it even more and lubricate the surface. After applying the water, run a razor blade slowly over the painted surface at a 45-degree angle. Use firm pressure, scrape in one direction, and remoisten the paint from time to time with the soapy rag so you don’t scratch the glass. Finish by rinsing the glass with fresh water and wiping it down with window cleaner. For tips on using chemical solvents to strip paint off window frames, read on!