单选按钮列表 [英] RadioButtonList
本文介绍了单选按钮列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
我有一个评估页面
最后我要提交此评估
但在此之前我想检查页面中的每个RadioButtonList是否都被检查
我该怎么做
我应该做什么(IF声明)
但是我有20个问题
所以......我会为他们所有人做的!!!!
或者还有另外一种方法检查一下??
解决方案
你可以尝试这个代码
展开 | 选择 | Wrap | 行号
比你多了
i了解这个想法
但我怎么写这个变量
var grp = document.forms [0] .elements [" BtnList1"];
这不是可用
document.forms [0] .elements [" BtnList1"];
它给我一个错误
< blockquote>表单中单选按钮的名称是什么?
你需要使它与javascript中引用的名称相同: -
Hi
I have an Evaluation Page
at the end I want to submit this Evaluation
But before that i want to check if every RadioButtonList in the page is checked
How can i do that
shall I do (IF Statement)
but i have 20 Question
so ... i will do for them all !!!!
or there is another way to check them all ??解决方案Hi,
You can try this code
Expand|Select|Wrap|Line Numbers
Than you a lot
i understand the idea
but how can i write this variable
var grp = document.forms[0].elements["BtnList1"];
this is not available
document.forms[0].elements["BtnList1"];
it gives me an error
What is the name given to your radio buttons in the form?
You need to make it the same name as referred to in the javascript :-
这篇关于单选按钮列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取
|
15天全站免登陆