'获得各个类别的单词 For m_iCount = 0 To (m_iPartCnt - 1) If Request.Form("txtWords" & m_iCount) <> "" Then m_astrWords(m_iCount) = Split(Request.Form("txtWords" & m_iCount), ",") End If 'Response.Write UBound(m_astrWords(m_iCount)) & "<br>" Next
'开始操作文件 'Response.Write "Begin to Operate Word Files<br>" Select Case m_strOpWay Case "SAVE" '保存单词到文件中 m_iSenPart = CInt(Request.Form("txtSenPart")) m_aiOpStatus(m_iSenPart) = SaveFile(m_iSenPart)
'根据操作状态,得到提示信息 Select Case m_aiOpStatus(m_iSenPart) Case 0 m_strPrompt = "[" & m_astrSenPart(m_iSenPart) & "]部分单词已成功地被保存到文件中"
Case 1 m_strPrompt = "[" & m_astrSenPart(m_iSenPart) & "]部分文件保存失败" End Select
Case "SAVEALL" '保存所有类别的单词到文件中 m_iErrCnt = 0 For m_iCount = 0 To (m_iPartCnt - 1) m_aiOpStatus(m_iCount) = SaveFile(m_iCount) If m_aiOpStatus(m_iCount) = 1 Then m_iErrCnt = m_iErrCnt + 1 End If Next
'根据操作状态,得到提示信息 Select Case m_iErrCnt Case 0 m_strPrompt = "所有类别的单词都已成功地被保存到文件中"
Case m_iPartCnt m_strPrompt = "所有类别的单词文件都保存失败"
Case Else m_strPrompt = "其中," For m_iCount = 0 To (m_iPartCnt - 1) If m_aiOpStatus(m_iCount) = 1 Then m_strPrompt = m_strPrompt & "[" & m_astrSenPart(m_iCount) & "]、" End If Next m_strPrompt = Left(m_strPrompt, Len(m_strPrompt) - 1) m_strPrompt = m_strPrompt & "部分文件保存失败" End Select
Case "LOAD" '从文件中载入单词 m_iSenPart = CInt(Request.Form("txtSenPart")) m_aiOpStatus(m_iSenPart) = LoadFile(m_iSenPart)
'根据操作状态,得到提示信息 Select Case m_aiOpStatus(m_iSenPart) Case 0 m_strPrompt = "[" & m_astrSenPart(m_iSenPart) & "]部分单词已成功地被载入"
Case 1 m_strPrompt = "[" & m_astrSenPart(m_iSenPart) & "]部分文件不存在,载入失败" End Select
Case "LOADALL" '从各个文件中载入单词 m_iErrCnt = 0 For m_iCount = 0 To (m_iPartCnt - 1) m_aiOpStatus(m_iCount) = LoadFile(m_iCount) If m_aiOpStatus(m_iCount) = 1 Then m_iErrCnt = m_iErrCnt + 1 End If Next
'根据操作状态,得到提示信息 Select Case m_iErrCnt Case 0 m_strPrompt = "所有类别的单词都已成功地被载入"
Case m_iPartCnt m_strPrompt = "所有类别的单词文件都不存在,载入完全失败"
Case Else m_strPrompt = "其中," For m_iCount = 0 To (m_iPartCnt - 1) If m_aiOpStatus(m_iCount) = 1 Then m_strPrompt = m_strPrompt & "[" & m_astrSenPart(m_iCount) & "]、" End If Next m_strPrompt = Left(m_strPrompt, Len(m_strPrompt) - 1) m_strPrompt = m_strPrompt & "部分文件不存在,载入部分失败" End Select End Select
'End If End If 'Response.Write "End to Operate Word Files<br>" 'Response.Write "Begin to Write Client Page<br>" %>
window.onload = window_onload; //----------------------------------------------------------- //初始化页面 function window_onload() { var iCount, iEleCnt; var colButton; var strHelp;