⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 randomsj.asp

📁 这是用asp做的一个网上考试题库系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<% 
 
if request.QueryString("time")=3 then
  Session("Title")="请输入试卷标题"
  Session("TotalMark")="100"
 Session("TotalTime")="100"
 Dim TxCount(5)
 Dim ndlist(5) 

Dim RzArray(5)

 Session("dxfs")="0"
 Session("dufs")="0"
 Session("tkfs")="0"
  Session("pdfs")="0"
  Session("fxfs")="0"
  
  for i=1 to 5
    TxCount(i)="0"
    ndlist(i)=20
  next  
  Session("Txlist")=TxCount
  Session("ndlist")=ndlist 
 RzArray(0)=10
  RzArray(1)=15
  RzArray(2)=20
  RzArray(3)=15
  RzArray(4)=20
  RzArray(5)=20

  Session("Rzlist")=RzArray
  
  
else
  
   TxCount=Session("Txlist")
   ndlist=Session("ndlist")
   RzArray=Session("Rzlist")
  
end if
%>
<html>
 
<script language="JavaScript">

 function gdonmouseover()
{
  gd.style.color="#00FFFF";
}
function gdonmouseout()
{
  gd.style.color="#CCCCFF"
}
function zsyonmouseover()
{
  zsy.style.color="#00FFFF";
}
function zsyonmouseout()
{
  zsy.style.color="#CCCCFF"
}
 function checkform()
{
   if((document.all.form1.Title.value=="")||(document.all.form1.TotalMark .value =="")||(document.form1.TotalTime.value==""))
   alert("请检查试卷属性是否填好");
    
   else if ((document.all.form1.zd.value=="")||(document.all.form1.lh.value=="")||(document.all.form1.yy.value=="")||(document.all.form1.pj.value=="")||(document.all.form1.zh.value=="")||(document.all.form1.fx.value==""))
        alert("请检查认知分布是否填好");
  else if (document.all.form1.csjr.value==""||document.all.form1.csjtime.value==""||document.all.form1.ssjr.value==""||document.all.form1.ssjtime.value=="")
         alert("请检查试卷情况是否填好");
 else document.form1.submit()
}
 
</script>
 
 <form method=post  action=sjhl.asp name=form1 >
   <table width="48%" border="0" bgcolor="#FF6666" bordercolor="#FFFFFF" align="center">
    <tr bgcolor="#FF3333"> 
      <td width="15%" nowrap bgcolor="#FF9999"> 
        <div onmouseover="gdonmouseover() " onmouseout="gdonmouseout()"> 
          <div align="center"><a href="./gdsj.asp"><font id=gd  color="#CCCCFF">固定试卷</font></a></div>
        </div>
      </td>
      <td width="18%" nowrap bgcolor="#FF9999"> 
        <div align="center"><a href="./randomsj.asp?time=3"><font color="#00FFFF">随机试卷</font></a></div>
      </td>
    </tr>
  </table>
<div align="center"></div>
<table width="85%" border="0" height="389" bordercolorlight="#C0C0C0" align="center">
  <tr bgcolor="#FFCCCC"> 
      <td height="171" width="22%"> 
        <div align="center"> 
        <table width="100%" border="0" align="left">
          <tr> 
            <td height="35"> 
              <div align="center">试卷属性</div>
            </td>
          </tr>
          <tr> 
            <td height="80"> 
              <script>
var messages=new Array()
messages[0]="<font   color=#008080>试卷标识输入您定义的试卷名称</font>"
messages[1]="<font    color=#008080>难度分布请用分值表示</font>"
messages[2]="<font   color=#008080>试卷总分表示此试卷的满分</font>"
messages[3]="<font  color=#008080>试卷用时表示此考试的最大时间</font>"
 
var scrollerwidth=110
var scrollerheight=60
var scrollerbgcolor='#FFCCCC'
//下面的代码不要改动
if (messages.length>1)
i=2
else
i=0
function move1(whichlayer){
tlayer=eval(whichlayer)
if (tlayer.top>0&&tlayer.top<=5){
tlayer.top=0
setTimeout("move1(tlayer)",3000)
setTimeout("move2(document.main.document.second)",3000)
return}
if (tlayer.top>=tlayer.document.height*-1){
tlayer.top-=5
setTimeout("move1(tlayer)",100)}
else{
tlayer.top=scrollerheight
tlayer.document.write(messages[i])
tlayer.document.close()
if (i==messages.length-1)
i=0
else
i++}}
function move2(whichlayer){
tlayer2=eval(whichlayer)
if (tlayer2.top>0&&tlayer2.top<=5){
tlayer2.top=0
setTimeout("move2(tlayer2)",3000)
setTimeout("move1(document.main.document.first)",3000)
return}
if (tlayer2.top>=tlayer2.document.height*-1){
tlayer2.top-=5
setTimeout("move2(tlayer2)",100)}
else{
tlayer2.top=scrollerheight
tlayer2.document.write(messages[i])
tlayer2.document.close()
if (i==messages.length-1)
i=0
else
i++}}
function move3(whichdiv){
tdiv=eval(whichdiv)
if (tdiv.style.pixelTop>0&&tdiv.style.pixelTop<=5){
tdiv.style.pixelTop=0
setTimeout("move3(tdiv)",3000)
setTimeout("move4(second2)",3000)
return}
if (tdiv.style.pixelTop>=tdiv.offsetHeight*-1){
tdiv.style.pixelTop-=5
setTimeout("move3(tdiv)",100)}
else{
tdiv.style.pixelTop=scrollerheight
tdiv.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++}}
function move4(whichdiv){
tdiv2=eval(whichdiv)
if (tdiv2.style.pixelTop>0&&tdiv2.style.pixelTop<=5){
tdiv2.style.pixelTop=0
setTimeout("move4(tdiv2)",3000)
setTimeout("move3(first2)",3000)
return}
if (tdiv2.style.pixelTop>=tdiv2.offsetHeight*-1){
tdiv2.style.pixelTop-=5
setTimeout("move4(second2)",100)}
else{
tdiv2.style.pixelTop=scrollerheight
tdiv2.innerHTML=messages[i]
if (i==messages.length-1)
i=0
else
i++}}
function startscroll(){
if (document.all){
move3(first2)
second2.style.top=scrollerheight}
else if (document.layers){
move1(document.main.document.first)
document.main.document.second.top=scrollerheight+5
document.main.document.second.visibility='show'}}
window.onload=startscroll
</script>
              <script language="JavaScript1.2">
if (document.all){
document.writeln('<span id="main2" style="position:relative;width:'+scrollerwidth+';height:'+scrollerheight+';overflow:hiden;background-color:'+scrollerbgcolor+'">')
document.writeln('<div style="position:absolute;width:'+scrollerwidth+';height:'+scrollerheight+';clip:rect(0 '+scrollerwidth+' '+scrollerheight+' 0);left:0;top:0">')
document.writeln('<div id="first2" style="position:absolute;width:'+scrollerwidth+';left:0;top:1;">')
document.write(messages[0])
document.writeln('</div>')
document.writeln('<div id="second2" style="position:absolute;width:'+scrollerwidth+';left:0;top:0">')
document.write(messages[1])
document.writeln('</div>')
document.writeln('</div>')
document.writeln('</span>')
}
</script>
              <ilayer id="main" width=&{scrollerwidth}; height=&{scrollerheight}; bgcolor=&{scrollerbgcolor}; left="-45" top="55"> 
              <layer id="first" left=19 top=2 width=&{scrollerwidth};> 
              <script language="JavaScript1.2">
if (document.layers)
document.write(messages[0])
</script>
              </layer>
              <layer id="second" left=0 top=0 width=&{scrollerwidth}; visibility=hide> 
              <script language="JavaScript1.2">
if (document.layers)
document.write(messages[1])
</script>
              </layer>
              </ilayer>
              <div align="center"></div>
            </td>
          </tr>
        </table>
      </div>
    </td>
      <td height="171" width="78%"> 
        <table width="100%" border="1" height="163" cellspacing="0">
          <tr> 
            <td width="25%" bgcolor="#FFFFFF"> 
              <div align="center">试卷标识</div>
            </td>
            <td width="75%" bgcolor="#FFFFFF"> 
              <div align="left"> 
                <input type="text" name="Title" value="<%=Session("Title")%>">
              </div>
            </td>
          </tr>
          <tr> 
            <td width="25%" height="70" bgcolor="#FFFFFF"> 
              <div align="center">试卷难度分布</div>
            </td>
            <td width="75%" height="70" bgcolor="#FFFFFF"> 
              <div align="left">
                <table width="101%" border="1" height="70" align="center">
                  <tr> 
                    <td width="20%"> 
                      <div align="center">难</div>
                    </td>
                    <td width="22%"> 
                      <div align="center">较难</div>
                    </td>
                    <td width="20%"> 
                      <div align="center">中</div>
                    </td>
                    <td width="19%"> 
                      <div align="center">较易</div>
                    </td>
                    <td width="19%"> 
                      <div align="center">易</div>
                    </td>
                  </tr>
                  <tr> 
                    <td width="20%" nowrap> 
                      <input type="text" name="n" size="4" value=<%=ndlist(1)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="jn" size="4" value=<%=ndlist(2)%>>
                      分 </td>
                    <td width="20%" nowrap> 
                      <input type="text" name="z" size="4" value=<%=ndlist(3)%>>
                      分 </td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -