我正在开发在线测试样本 [英] I am developing online test sample

查看:78
本文介绍了我正在开发在线测试样本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发在线测试样本,我想从数据库中检索问题和答案并显示它们.实际上,它的工作方式是,我的问题是当我选择第二个问题的答案时,第一个未选中.这是什么问题.

I am developing online test sample,i want to retrieve the question and answers from the database and display them.Actually its working,my problem is when i select answer for second question,the first is unchecked.what is the problem.

推荐答案

如果您的input元素的类型为radio按钮,则可能已将所有答案的name属性设置为相同的名称.为了使单选按钮的行为符合预期,每组单选按钮(每个问题一组)必须具有相同的名称属性.

问候,

曼弗雷德(Manfred)
If your input elements are of type radio button, you have probably set the name attribute of all answers to the same name. For the radio button to behave as expected each group (one group per question) of radio buttons needs to have the same name attribute.

Regards,

Manfred


这篇关于我正在开发在线测试样本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆