This article will share with you the example code of a simple multiple-choice assessment system implemented in js. It is very good and has reference value. Friends who need it can refer to it
Includes content: JS encapsulation form, JS verification form
It is said to be an evaluation system, but it feels like it can only be regarded as a small demo. It is very watery, has no database, and only uses JS to make a simple multiple-choice evaluation system.
----- -------------------------------------------------- --------------------------
1. Design ideas
Form encapsulation:
[1] Since it is submitted using JS encapsulation, there is no need for form tags
[2] Place multiple input tags as input items
【3】Write JS to obtain input items and submit them to another page through get method
Verification form (display results)
【1】Get the parameters passed in by get
【2】Parse through JS
【3】Display to the corresponding location
----------------------- -------------------------------------------------- -------
##2. The reference source code is as follows
request.html考试系统 2016--2017学年期末测试题
一、单选题(每题12分,满分60分)
1.当方法遇到异常又不知如何处理时,下列() 做法是正确的。
A、捕获异常
B、抛出异常
C、声明异常
D、嵌套异常
2.下列说法错误的是()
A、在java中一个类被声明为final类型,表示该类不能被继承。
B、当一个对象被当作参数传递到一个方法后,此方法可改变这个对象的属性,这叫引用传递。
C、一个类不能既被声明为 abstract,又被声明为final。
D、方法的覆盖(Overriding)和重载(Overloading)是Java多态性的表现,他们没有区别。
3.下列创建数组的方法哪个是错误的?
A、Date[] arr = new Date[5];
B、Date arr[] = new Date[];
C、Date arr[][] = new Date[4][5];
D、Date arr[][] = new Date[4][];
4.在读文件Employee.txt 时,可以直接使用该文件作为参数的类是()
A、BufferedReader
B、FileInputStream
C、DataOutputStream
D、DataInputStream
5.下列关于线程的说法中,错误的是?
A、线程必须通过方法start() 来启动。
B、线程创建后,其优先级是可以改变的。
C、实现Runnable接口或者从Thread类派生的线程类没有区别。
D、当对象用synchronized 修饰时,表明该对象在任一时刻只能由一个线程访问。
二、多选题(每题20分,满分40分,错选、少选、多选不得分)
6.下列说法正确的是()
A、在java中一个类被声明为final类型,表示该类不能被继承。
B、当一个对象被当作参数传递到一个方法后,此方法可改变这个对象的属性,这叫引用传递。
C、一个类不能既被声明为 abstract,又被声明为final。
D、方法的覆盖(Overriding)和重载(Overloading)是Java多态性的表现,他们没有区别。
7.当方法遇到异常又不知如何处理时,下列() 做法是不正确的。
A、捕获异常
B、抛出异常
C、声明异常
D、嵌套异常
The above is the detailed content of Example showing JS implementing a simple multiple-choice assessment system. For more information, please follow other related articles on the PHP Chinese website!