How do you check if an HTML form checkbox field is checked in JavaScript?

Learn how to verify if a checkbox or radio button is checked using the .checked property in JavaScript.

By Craig Buckler
October 25, 2016
Screenshot from "How do you check if an HTML form checkbox field is checked in JavaScript?" Screenshot from "How do you check if an HTML form checkbox field is checked in JavaScript?"

The ability to manipulate HTML form data is essential in most web applications. In this video Craig Buckler teaches you how to retrieve values from both checkboxes and radio buttons with the .checked property. Novice JavaScript developers will learn how to take true-false form responses and translate them into useful data.

Take the next step in JavaScript with our Beginning JavaScript Learning Path.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more

Craig Buckler is an experienced Web Developer working in the UK who started his career creating desktop software. Craig has worked for a number of well-known companies, including Microsoft, MSN, Thomson Reuters, as well as the UK & EU governments. Craig is the prolific author of countless articles and tutorials on HTML5, CSS3, JavaScript, JQuery, PHP, and Node.js.

Post topics: Web Programming
Post tags: Questions
Share: