trandumper.htm

来自「用jsp编的一个网络程序」· HTM 代码 · 共 776 行 · 第 1/3 页

HTM
776
字号
<html>
<script Language="JavaScript">
function openwindow(href) {
	window.open(href)
}

function ShowHint() {
	if (parent.up.JJ.indexOf('['+parent.up.II+']')<0) 
	{ 
		parent.up.JJ=parent.up.JJ + '[' + parent.up.II + ']';
	}
	for (i=0;i<parent.side.myChkbx.length;i++) 
	{
		parent.side.myChkbx(i).disabled = true;
		if (parent.up.Ans(parent.up.II).indexOf(parent.up.Opti(parent.up.II, i+1))>=0)
		{
			parent.side.SELE(i).innerHTML='<font color=red><b>' + parent.up.Opti(parent.up.II,i+1) + '. '; 
			parent.side.ENGL(i).innerHTML='<font color=red><b>' + parent.up.Body(parent.up.II,i+1);
		}
	} 
	parent.side.COMM.innerHTML='<font face=Verdana color=red size=2><b>Answer:&nbsp' + parent.up.Ans(parent.up.II) + '</b></font><br><font size=2 face=Verdana color=DarkBlue>';
        if (parent.up.randomans==0)
	{
	 parent.side.COMM.innerHTML= parent.side.COMM.innerHTML + parent.up.Desc(parent.up.II);
	}
}

var intHours, intMinutes, intSeconds;
intHours = 0;
intMinutes = 0;
intSeconds = 0;

function tick() {
  var hours, minutes, seconds;
  var nowHowers, nowMinutes, nowSeconds;
  var today;
  today = new Date();
  nowHours = today.getHours();
  nowMinutes = today.getMinutes();
  nowSeconds = today.getSeconds();
  intSeconds++;
  if (intSeconds>=60) {
	intSeconds -= 60;
	intMinutes++;
  }
  if (intMinutes>=60) {
	intMinutes -= 60;
	intHours++;
  }
  if (intHours < 10) {
     hours = "0"+intHours+":";
  } else {
     hours = intHours+":";
  }
  if (intMinutes < 10) {
     minutes = "0"+intMinutes+":";
  } else {
     minutes = intMinutes+":";
  }
  if (intSeconds < 10) {
     seconds = "0"+intSeconds+" ";
  } else {
     seconds = intSeconds+" ";
  }
  if (nowHours < 10) {
     nowHours = "0"+nowHours;
  }
  if (nowMinutes < 10) {
     nowMinutes = "0"+nowMinutes;
  }
  if (nowSeconds < 10) {
     nowSeconds = "0"+nowSeconds;
  }
  parent.topp.Now.innerHTML = nowHours+":"+nowMinutes+":"+nowSeconds;
  timeString = hours+minutes+seconds;

  parent.topp.Clock.innerHTML = timeString;

  window.setTimeout("tick();", 1000);
}
</script>

<script Language="VBScript" >
Dim Subject(400)  
Dim Body(400,15)  
Dim Opti(400,15)  
Dim Usr(400)      
Dim Ans(400)      
Dim Markk(400)	 
Dim Desc(400)    
Dim II, MM, JJ, DISAB
Dim MAXIMI, MAXIMJ
Dim AA, LOGO, FOLDER, PAScore, WRIGHTS, WRONGS, TOTALS, learnmode, randomquest, randomans
Dim R(), S()
Dim filesys
WRIGHTS=0
WRONGS=0
TOTALS=0
PAScore = 800
DISAB = ""
II=0
JJ=""            
MM=0
MAXIMI=400
MAXIMJ=15

Sub ReadFile()
	Dim a
	Dim i, j, k, kk, strTmp, arrTmp, blnSubj, blnBody, pre
	Dim PATH

	For i = 1 To MAXIMI
	  Markk(i) = 0
	Next

	i = 0
	j = 0
	Set a = top.hid.filesys.OpenTextFile(top.hid.FOLDER & top.hid.AA, 1, False)
	strTmp = "a"
	pre = false
	Do While a.AtEndOfStream <> True
		If i >= MAXIMI Then Exit Do
		strBak = Trim(strTmp)
		If i = 0 Then strBak = ""
		strTmp = a.ReadLine
		If strTmp <> "" and strBak = "" Then
			strTmp = Trim(join(split(strTmp, Chr(9)),""))
			strStar = ""
			Do While Left(strTmp, 1) = "*"
				strTmp = Trim(Right(strTmp, Len(strTmp)-1))
				strStar = strStar & "*"
			Loop
			arrTmp = Split(strTmp, ".")
			If UBound(arrTmp) <=0 Then 
				ReDim arrTmp(1)
			End If
			If NOT IsNumeric(arrTmp(0)) Then arrTmp(0) = 0
			If arrTmp(0)> 0 and arrTmp(0) < 999 and Len(arrTmp(1)) >4 Then i=i+1
		End If
	Loop
	a.Close
	MM = i
	ReDim R(MM), S(MM)
	For i = 1 to MM
		R(i) = i
	Next

	If top.hid.randomquest = 1 Then
		Randomize
		For i = 1 To MM
			j = Int(MM*Rnd)+1
			tmp = R(j)
			R(j) = R(i)
			R(i) = tmp
		Next
	End If

	For i = 1 To MM
		For j = 1 To MM
			If R(j) = i Then
				S(i) = j
				Exit For
			End If
		Next
	Next

	i = 0
	j = 0
	blnSubj = False

	Set a = top.hid.filesys.OpenTextFile(top.hid.FOLDER & top.hid.AA, 1, False)
	strTmp = "<BR>"
	Do While a.AtEndOfStream <> True
		If i >= MAXIMI Then Exit Do
		strBak = strTmp
		strTmp = a.ReadLine
		If InStr(strTmp, "<pre>") > 0 Then pre = True
		If pre=False Then
			strTmp = Trim(join(split(strTmp, Chr(9)),""))
		End If
		If InStr(strTmp, "</pre>") > 0 Then pre = False
		strStar = ""
		Do While Left(strTmp, 1) = "*"
			strTmp = Trim(Right(strTmp, Len(strTmp)-1))
			strStar = strStar & "*"
		Loop
		arrTmp = Split(strTmp, ".")
		If UBound(arrTmp) <=0 Then 
			ReDim arrTmp(1)
		End If
		If NOT IsNumeric(arrTmp(0)) Then arrTmp(0) = 0
		If (strBak = "<BR>" or strBak="") and blnSubj=False and arrTmp(0)> 0 and arrTmp(0) < 999 and Len(arrTmp(1)) >4 Then
			i = i + 1
			K = R(i)
			j = 0
			Subject(K) = strStar & Right(strTmp, Len(strTmp)-Len(arrTmp(0))-1) & vbCrLf
			Ans(K) = ""
			Usr(K) = ""
			Desc(K) = ""
			strONE = Right(Subject(K),1)
			If strONE = "." or strONE = ":" or strONE = "" or strONE = "?" or strONE = "%" or (strONE >="0" and strONE <="9") Then Subject(K) = Subject(K) & "<BR>"
			blnSubj = True
			blnBody = False
		ElseIf (Mid(strTmp, 2, 1) = ")" or  Mid(strTmp, 2, 1) = ".") and UCase(Left(strTmp,1))>="A" Then
			j = j + 1
			blnSubj = False
			blnBody = True
			Body(K, j) = Right(strTmp, Len(strTmp) - 2)
			Opti(K, j) = UCase(Left(strTmp, 1))
			If UCase(Right(Body(K,j),8)) = "(ANSWER)" Then
				If InStr(Ans(K), Opti(K,j))<=0 Then Ans(K)=Ans(K) & Opti(K,j)
				Body(K,j) = Left(Body(K,j), Len(Body(K,j))-8)
			End If
		ElseIf UCase(Left(strTmp, 7)) = "ANSWER:" Then
			blnSubj = False
			blnBody = False
			Ans(K) = UCase(Trim(Right(strTmp, Len(strTmp) - 7)))
			Ans(K) = join(split(Ans(K), "AND "), "")
			Ans(K) = join(split(Ans(K), ","), "")
			Ans(K) = join(split(Ans(K), " "), "")
		ElseIf UCase(Left(strTmp, 8)) = "ANSWER :" Then
			blnSubj = False
			blnBody = False
			Ans(K) = UCase(Trim(Right(strTmp, Len(strTmp) - 8)))
			Ans(K) = join(split(Ans(K), "AND "), "")
			Ans(K) = join(split(Ans(K), ","), "")
			Ans(K) = join(split(Ans(K), " "), "")
		ElseIf UCase(Left(strTmp, 4)) = "ANS:" Then
			blnSubj = False
			blnBody = False
			Ans(K) = UCase(Trim(Right(strTmp, Len(strTmp) - 4)))
			Ans(K) = join(split(Ans(K), "AND "), "")
			Ans(K) = join(split(Ans(K), ","), "")
			Ans(K) = join(split(Ans(K), " "), "")
		ElseIf UCase(Left(strTmp, 5)) = "ANS :" Then
			blnSubj = False
			blnBody = False
			Ans(K) = UCase(Trim(Right(strTmp, Len(strTmp) - 5)))
			Ans(K) = join(split(Ans(K), "AND "), "")
			Ans(K) = join(split(Ans(K), ","), "")
			Ans(K) = join(split(Ans(K), " "), "")
		Else
			If blnBody = True Then
				If Len(strTmp) = 0 Then
					blnBody = False
				Else
					Body(K,j) = Body(K,j) & " " & strTmp
					If UCase(Right(Body(K,j),8)) = "(ANSWER)" Then
						If InStr(Ans(K), Opti(K,j))<=0 Then Ans(K)=Ans(K) & Opti(K,j)
						Body(K,j) = Left(Body(K,j), Len(Body(K,j))-8)
					End If
				End If
			ElseIf blnSubj = True Then
				If Left(strTmp, 1) = "-" and Right(Subject(K),4) <> "<BR>" Then strTmp = "<BR>" & strTmp
				Subject(K) = Subject(K) & " " & strTmp & vbCrLf
				strONE = Right(strTmp,1)
				If strONE = "." or strONE = ":" or strONE = "" or strONE = "?" or strONE = "%" or (strONE >="0" and strONE <="9") Then Subject(K) = Subject(K) & "<BR>"
			ElseIf not blnSubj and not blnBody Then
				If Left(strTmp, 1) = "-" Then strTmp = "<BR>" & strTmp

⌨️ 快捷键说明

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