I have two radio buttons within an HTML form. A dialog box appears when one of the fields is null. How can I check whether a radio button is selected?
标签:
javascript
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- Can php detect if javascript is on or not?
HTML:
JAVAScript:
just a lil bit modification to Mark Biek ;
HTML CODE
and Javascript code to check if radio button is selected
http://www.somacon.com/p143.php/
this is a utility function I've created to solve this problem
With mootools (http://mootools.net/docs/core/Element/Element)
html:
js:
The form
The script
The fiddle: http://jsfiddle.net/PNpUS/