本文介绍了通过无线电按钮显示正确答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
每个身体


表格的结构是
问题文字框
选择1文本框单选按钮1
选择2文本框单选按钮2
选择3文本框单选按钮3
选择4文本框单选按钮4
并保存按钮

假设

问题-印度的首都是什么?
它的选择是
选择1-斯里兰卡
选择2-印度
选择3-纽约
选择4-伦敦

正确答案是印度,其ID为2

在三个表中插入数据后,它将看起来

tblQuestion
qid问题
-------------------
1印度的首都是什么?

tblAnswerChoice
ansid qid选择
-------------------------
1 1斯里兰卡
2 1印度
3 1纽约
4 1伦敦

tblAnswer

援助qid ansid
----------------------
1 1 2


现在我的问题是如何通过单选按钮显示正确答案
答案选择.
对于上面的示例,单选按钮2将被选中为true
但可以通过单选按钮显示正确答案

谢谢.
Deepak

Hello,
Every Body


The structure of the form is
Question textbox
Choice 1 textbox radiobutton 1
Choice 2 textbox radiobutton 2
Choice 3 textbox radiobutton 3
choice 4 textbox radiobutton 4
and save button

Suppose

Question - What is the capital of India?
and its choices are
Choice 1- SriLanka
Choice 2- India
Choice 3- NewYork
Choice 4- London

the correct answer is india and its id is 2

After inserting the data in three table it will look

tblQuestion
qid Question
-------------------
1 What is the capital of India?

tblAnswerChoice
ansid qid Choice
-------------------------
1 1 SriLanka
2 1 India
3 1 NewYork
4 1 London

tblAnswer

aid qid ansid
----------------------
1 1 2


Now my problem how to show the correct answer through radio button corresponding
the answer choice.
for above example the radiobutton 2 will be checked true
but it is possible to show the correct answer through radio button

Thanks.
Deepak

推荐答案


这篇关于通过无线电按钮显示正确答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 02:26