如何获取html控件的值Radiobutton选中的值,html DropDownlist选择的项值,以及html复选框控件使用Java Script检查项目值 [英] How to Get Value of html control Radiobutton selected value ,html DropDownlist selected item value ,and html checkbox control Checked item value using Java Script
本文介绍了如何获取html控件的值Radiobutton选中的值,html DropDownlist选择的项值,以及html复选框控件使用Java Script检查项目值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个html页面,其中包含一些控件,如男性或女性的-radio按钮,资格的复选框,以及Hobies的下拉列表,现在我想使用java脚本验证该表单,但我不明白如何使用html页面上的java脚本获取所选复选框,单选按钮和下拉列表项值的值。
请帮帮我。
I have a html page with a form which contain some controls like -radio button form male or female , checkbox for qualification , and dropdown for Hobies , and now i want to validate that form using java script , but i dont understand that how to get value of selected checkbox , radiobutton , and dropdownlist item value using java script on html page .
please help me .
推荐答案
也许是时候通过一个教程。
这是一个开始的地方 W3Schools:JavaScript Tutorial [ ^ ]
尤其是 JavaScript表格验证 [ ^ ]
Maybe time to go through a tutorial.
This is one place to start W3Schools: JavaScript Tutorial[^]
And especially JavaScript Form Validation[^]
这篇关于如何获取html控件的值Radiobutton选中的值,html DropDownlist选择的项值,以及html复选框控件使用Java Script检查项目值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文