在在线考试系统中解释答案 [英] Explain the answer in an Online examination system

查看:72
本文介绍了在在线考试系统中解释答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要有关如何编码的帮助,以解释在线考试项目中问题的答案。想要在单击名为explain的按钮时编码工作,问题的解释及其答案将显示在与问题相同的页面上。请提出建议和链接。谢谢。

解决方案

你可以用两种方式完成这个......



1。使用代码差异

只需在面板中为每个问题加载问题说明并设置 visibility =false ..当用户点击说明按钮设置面板时 visibility =true ..

示例:

以下Html ..

 <   div  >  
问题1.什么是对象..?
< br < span class =code-keyword> / >
答案:对象是类
的实例< br / >
< asp:按钮 ID = Button1 runat < span class =code-keyword> = server 文本 = 解释 / >
< br / >
< asp:Panel ID = panel1 可见 = false runat = server >
类或结构定义类似于指定
类型的蓝图。对象基本上是根据蓝图分配和配置
的内存块。程序可以创建同一类的许多对象。
动态。
< / asp:Panel >
< / div >





代码落后..

 < span class =code-keyword>受保护的  Sub  Button1_Click( ByVal  sender 作为 对象 ByVal  e  As  System.EventArgs)句柄 Button1.Click 
如果 panel1.Visible = True 然后
panel1.Visible = 错误
Button1.Text = explain
Else
panel1.Visible = True
Button1.Text = 隐藏
结束 如果

结束 Sub







2。使用JQuery
下面的
脚本..

< script src =    js / jquery-1.4.2.js type =  文本/ JavaScript的>< /脚本> 
< script type = text / javascript>


document )。ready( function ()
{

#div1)。hide();

I need help on how to code, for an explain the answer to a question in an Online Examination project. want to code to work when you click a button named "explain", the explanation of the question and its answer will appear on the same page as the question. Please suggestions and links will be appreciated. Thank you.

解决方案

You can done this using two ways..

1. Using code behing
Just load explanation of the question in panel for each questions and set visibility="false".. When user clicks on explain button set panel visibility="true"..
Example :
Html below..

<div>
        Question 1. what is object..?
        <br />
        Answer : Object is a instance of class
        <br />
        <asp:Button ID="Button1" runat="server" Text="explain" />
           <br />
        <asp:Panel ID="panel1" Visible="false" runat="server">
            A class or struct definition is like a blueprint that specifies what the type can
            do. An object is basically a block of memory that has been allocated and configured
            according to the blueprint. A program may create many objects of the same class.
            dynamically.
        </asp:Panel>
    </div>



Code behind..

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If panel1.Visible = True Then
            panel1.Visible = False
            Button1.Text = "explain"
        Else
            panel1.Visible = True
            Button1.Text = "Hide"
        End If

    End Sub




2. Using JQuery
script below..

<script src="js/jquery-1.4.2.js" type="text/javascript"></script>
   <script type="text/javascript">


(document).ready(function() {


("#div1").hide();


这篇关于在在线考试系统中解释答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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