Radio Buttons and Textareas
I'll be honest—radio buttons and textareas aren't very exciting. I racked my brain to come up with some exciting, yet practical, real-world applications for radio buttons and textareas, and well, there aren't many. So I put together a simple example that shows off some of the different aspects of radio buttons and textareas without trying to force semiuseful features into a phony situation that would never occur in the real world.
Radio Buttons
Radio buttons are a little different than other form elements. Radio buttons only occur in collections—it never makes sense to have only one radio button. Buttons are placed in the same group by giving them the same name—it doesn't matter where they are on the Web page. Figure ...
Get Advanced JavaScript™: Insights and Innovative Techniques now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.