jquery实现在线考试答题问卷代码
代码语言:html
所属分类:其他
代码描述:jquery实现在线考试答题问卷代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
@charset "utf-8";
* {
margin:0;
padding:0
}
html {
background:#f6f6f6
}
*html {
_background-attachment:fixed;
_background-image:url(about:blank)
}
body {
margin-left:0;
margin-top:0;
margin-right:0;
margin-bottom:0;
background:url(//repo.bfw.wiki/bfwrepo/image/61923f261c983.png) top center no-repeat;
font-size:14px;
color:#333;
font-family:"宋体";
text-decoration:none
}
#flashContent {
width:100%;
height:100%
}
.main {
width:1000px;
float:right
}
a {
font-size:14px;
color:#333;
font-family:"宋体";
text-decoration:none
}
a:link,a:visited,a:active {
color:#333;
font-size:14px
}
a:hover {
color:#d35f03
}
a.a-f12:link,a.a-f12:visited,a.a-f12:active {
color:#333;
font-size:12px
}
a.a-f12:hover {
color:#d35f03
}
img {
border:0;
margin:0;
padding:0;
line-height:0
}
ul,li,p,h1,h2,h3,h4,h5,span,dl,dd,dt {
margin:0;
padding:0
}
ul,li {
list-style:none
}
small {
font-size:12px;
color:#666;
font-family:Arial,Helvetica,sans-serif,"宋体"
}
.clearfix {
clear:both;
font-size:0;
line-height:0;
height:0
}
.clear {
clear:both
}
.border {
border:1px solid #ddd
}
.border-blue {
border:1px solid #c4cef6
}
.border-lrb {
border-bottom:1px solid #ddd;
border-left:1px solid #ddd;
border-right:1px solid #ddd
}
.border-lr {
border-left:1px solid #ccc;
border-right:1px solid #ccc
}
.border-b {
border-bottom:1px solid #ddd
}
.border-t {
border-top:1px solid #ddd
}
.border-r {
border-right:1px solid #ddd
}
.border-l {
border-left:1px solid #ddd
}
.border-no {
border:0
}
.radius-6 {
-moz-border-radius:6px;
-khtml-border-radius:6px;
-webkit-border-radius:6px;
border-radius:6px
}
.radius-3 {
-moz-border-radius:3px;
-khtml-border-radius:3px;
-webkit-border-radius:3px;
border-radius:3px
}
.radius-2 {
-moz-border-radius:2px;
-khtml-border-radius:2px;
-webkit-border-radius:2px;
border-radius:2px
}
.b1 {
height:1px;
font-size:1px;
overflow:hidden;
display:block;
background:#B2D0EA;
margin:0 3px;
clear:both
}
.b2 {
height:1px;
font-size:1px;
overflow:hidden;
display:block;
background:#fff;
border-right:2px solid #B2D0EA;
border-left:2px solid #B2D0EA;
margin:0 1px;
clear:both
}
.b3 {
height:1px;
font-size:1px;
overflow:hidden;
display:block;
background:#fff;
border-right:1px solid #B2D0EA;
border-left:1px solid #B2D0EA;
margin:0 1px;
clear:both
}
.bc {
overflow:hidden;
display:block;
background:#fff;
border-right:1px solid #B2D0EA;
border-left:1px solid #B2D0EA;
margin:0;
clear:both
}
.bc-h01 {
height:100px
}
.bc-h02 {
height:500px;
overflow:auto;
_overflow-x:hidden
}
.bc-h03 {
height:30px;
line-height:30px
}
.bt {
text-indent:20px
}
.bb1 {
background:#B8E7B3
}
.bb2 {
background:#E7F9E3;
border-left-color:#B8E7B3;
border-right-color:#B8E7B3
}
.bb3 {
background:#E7F9E3
}
.color-change {
background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#fff),color-stop(1,#eee))
}
.box-shadow {
-moz-box-shadow:2px 5px 5px #969696;
-webkit-box-shadow:2px 5px 5px #969696;
box-shadow:2px 5px 5px #969696
}
.box-shadow-ie {
filter:progid:DXImageTransform.Microsoft.Shadow(color='#969696',Direction=135,Strength=5);
background-color:#eee
}
.box-shadow-ie-r {
filter:progid:DXImageTransform.Microsoft.Shadow(color='#969696',Direction=135,Strength=5);
background-color:#fff
}
.bg-blue {
background:#83d2ff
}
.left {
float:left
}
.right {
float:right
}
.center {
text-align:center
}
.ml5 {
margin-left:5px
}
.mr5 {
margin-right:5px
}
.mt5 {
margin-top:5px
}
.mb5 {
margin-bottom:5px
}
.ml10 {
margin-left:10px
}
.mr10 {
margin-right:10px
}
.mt10 {
margin-top:10px
}
.mb10 {
margin-bottom:10px
}
.ml15 {
margin-left:15px
}
.mr15 {
margin-right:15px
}
.mt15 {
margin-top:15px
}
.mb15 {
margin-bottom:15px
}
.mb20 {
margin-bottom:20px
}
.mt20 {
margin-top:20px;
_margin-top:10px
}
.ml20 {
margin-left:20px
}
.mr20 {
margin-right:20px
}
.m20 {
margin:20px
}
.m10 {
margin:10px
}
.m15 {
margin:15px
}
.m5 {
margin:5px
}
.pl5 {
padding-left:5px
}
.pr5 {
padding-right:5px
}
.pt5 {
padding-top:5px
}
.pl10 {
padding-left:10px
}
.pr10 {
padding-right:10px
}
.pt10 {
padding-top:10px
}
.pb10 {
padding-bottom:10px
}
.pl15 {
padding-left:15px
}
.pr15 {
padding-right:15px
}
.pt15 {
padding-top:15px
}
.pb15 {
padding-bottom:15px
}
.pb20 {
padding-bottom:20px
}
.pt20 {
padding-top:20px
}
.pl20 {
padding-left:20px
}
.pr20 {
padding-right:20px
}
.p20 {
padding:20px
}
.p10 {
padding:10px
}
.p15 {
padding:15px
}
.p5 {
padding:5px
}
.p3 {
padding:3px
}
.mlr20 {
margin-left:20px;
margin-right:20px
}
.no-bg {
background:0
}
.bg-white {
background:#fff
}
.f12 {
font-size:12px
}
.f14 {
font-size:14px
}
.f16 {
font-size:16px
}
.f18 {
font-size:18px
}
.f20 {
font-size:20px
}
.f22 {
font-size:22px
}
.f24 {
font-size:24px
}
.cGray,.aGray,.bGray,.aWhite {
font-family:Arial,Gadget,sans-serif
}
.aGray {
color:#999
}
.cGray {
color:#666
}
.bGray {
color:#333
}
.aWhite {
color:#fff
}
.fRed {
color:#900
}
.fBlue {
color:#025d94
}
.lh28 {
line-height:28px
}
.lh26 {
line-height:26px
}
.lh24 {
line-height:24px
}
.lh20 {
line-height:20px
}
.lh18 {
line-height:18px
}
.text-center {
text-align:center
}
.text-left {
text-align:left
}
.text-right {
text-align:center
}
.mainbox {
width:1000px
}
.box-center {
margin:0 auto
}
.col-l-01 {
width:310px;
height:100px;
margin-top:71px;
_margin-top:71px
}
.col-l-01 .col-l-01-w {
width:300px;
height:90px
}
.col-l-01 .text-left p {
margin-top:5px;
color:#525252
}
.col-l-02 {
width:310px;
height:500px
}
.col-l-02 h4 {
width:100%;
height:30px;
background:#efefef;
margin-top:10px;
line-height:30px;
text-indent:10px
}
.col-l-02 a {
display:block;
float:left;
border:1px solid #d1d1d1;
text-align:center;
margin-right:5px;
width:32px;
height:32px;
line-height:32px;
margin-top:5px
}
.col-r-03 {
width:200px
}
.side_l {
position:fixed;
_position:absolute;
_top:expression(documentElement.scrollTop+0+"px");
_background-attachment:fixed
}
.col-r-01 {
width:670px;
margin-top:71px
}
.col-r-01 h4 {
min-height:30px;
height:auto!important;
height:30px;
background:#efefef;
margin-top:10px;
line-height:30px;
text-indent:10px;
font-weight:normal;
padding:0 10px;
font-size:14px;
position:relative;
_height:30px;
_line-height:30px
}
.col-r-01 .m-checkBox a {
display:block;
float:left;
border:1px solid #d1d1d1;
text-align:center;
margin-right:5px;
width:32px;
height:32px;
line-height:32px;
margin-top:5px
}
.col-r-01 .question-option-list span {
font-size:14px;
font-family:"Gill Sans","Gill Sans MT","Myriad Pro","DejaVu Sans Condensed",Helvetica,Arial,sans-serif;
color:#999;
width:32px;
height:30px;
float:left;
clear:both;
line-height:30px;
margin-left:20px;
_line-height:39px;
_height:39px
}
.col-r-01 .option-content {
line-height:30px;
_line-height:16px;
_height:16px;
text-align:left
}
.col-r-01 a.question-btn {
display:block;
width:80px;
margin-left:20px;
background:#E6FDF9;
height:30px;
line-height:30px
}
.col-r-01 a.mus {
background:#FF7600
}
.col-r-01 .bt span {
float:right
}
.toplogo {
background:url(//repo.bfw.wiki/bfwrepo/image/61923f261c983.png) no-repeat;
background-size:cover;
width:100%;
height:61px;
position:fixed;
_position:absolute;
_top:expression(documentElement.scrollTop+0+"px");
z-index:1;
_background-attachment:fixed
}
.toplogo .logo a {
font-size:18px;
font-family:"黑体";
color:#fff;
font-weight:bold
}
.toplogo .but {
width:370px
}
.toplogo .but span {
display:block;
width:140px;
height:30px;
background:white;
text-align:center;
line-height:30px;
float:left;
border-radius: 10px;
}
.toplogo .but a {
display:block;
float:left;
width:104px;
height:30px;
margin-left:10px
}
.toplogo .but .btn01 {
background:white;
border-radius: 10px;
}
.toplogo .but .btn02 {
background: #ff7600;
color: white;
line-height: 31px;
text-align: center;
border-radius: 10px;
font-weight: bold;
}
}
.target {
position:relative;
display:block;
top:-60px;
visibility:hidden
}
.placeholder {
display:block;
position:relative;
top:-62px;
height:62px;
visibility:hidden
}
@media(max-width:800px) {
.side_l {
width:20%
}
}
</style>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {});
var timerId;
var mm;
var ii = 0;
function StartTimer(a, b) {
mm = a;
if (b == 0) {
ii = 60
} else {
ii = b
}
timerId = setInterval("recycle()", 1000)
}
function recycle() {
if (ii == 0) {
ii = 60;
mm = mm - 1
}
ii = ii - 1;
var a = " " + mm + "分" + ii + "秒";
$("#lasttime").html(a);
document.getElementById("txtTimer").value = a;
if ((mm == 0 && ii == 0) || mm < 0) {
clearInterval(timerId);
$("#lasttime").html(" " + 0 + "分" + 0 + "秒");
document.getElementById("txtTimer").value = " " + 0 + "分" + 0 + "秒";
UpExam(-3)
} else {
if (GetDateDiff(CurentTime(), $("#endtime").val(), "second") < 0) {
UpExam(-3)
}
}
}
function CurentTime() {
var f = new Date();
var g = f.getFullYear();
var e = f.getMonth() + 1;
var b = f.getDate();
var c = f.getHours();
var d = f.getMinutes();
var a = g + "-";
if (e < 10) {
a += "0"
}
a += e + "-";
if (b < 10) {
a += "0"
}
a += b + " ";
if (c < 10) {
a += "0"
}
a += c + ":";
if (d < 10) {
a += "0"
}
a += d;
return (a)
}
function GetDateDiff(d, b, a) {
d = d.replace(/-/g, "/");
b = b.replace(/-/g, "/");
a = a.toLowerCase();
var e = new Date(d);
var c = new Date(b);
return parseInt((c.getTime() - e.getTime()))
}
function getAjax(c, b, a) {
$.ajax({
type: "post",
dataType: "json",
url: c,
data: b,
cache: false,
async: false,
success: function(d) {
a(d)
}
})
}
function GetData(c, b) {
var a;
getAjax(c, b, function(d) {
a = d
});
return a
}
function GetNoAnswer() {
var e = "";
var d = $("#HidhisID").val();
var c = GetData("/" + d);
if (c != null) {
var b = c.ds;
$.each(c.ds, function(f) {
if (this.QuestionType != 4) {
var g = $('input[name="rd' + this.QuestionID + '"]:checked');
if (g.length == 0) {
e += this.Num + ","
}
} else {
var a = $("#rd" + this.QuestionID).val();
if (a == "") {
e += this.Num + ","
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0