[ASP]精华代码

2019-01-14 07:34:45刘景俊

            midValue = MidB(value, begPos, endPos - begPos)
              intDict.Add "ContentType", trim(byteToString(midValue))

            begPos = endPos + 4
            endPos = LenB(value)

            nameValue = MidB(value, begPos, ((endPos - begPos) - 1))
          Else
            nameValue = trim(byteToString(MidB(value, nValue + 5)))
          End If

          If isValid = True Then

            intDict.Add "Value", nameValue
            intDict.Add "Name", nameN

            dict.Add byteToString(nameN), intDict
          End If
      End If

      currentPos = lenSeparator + inStrByte
    Wend
  End Sub

  End Class

  Private Function stringToByte(toConv)
    Dim tempChar
     For i = 1 to Len(toConv)
       tempChar = Mid(toConv, i, 1)
      stringToByte = stringToByte & chrB(AscB(tempChar))
     Next
  End Function

  Private Function byteToString(toConv)
    For i = 1 to LenB(toConv)
      byteToString = byteToString & Chr(AscB(MidB(toConv,i,1))) 
    Next
  End Function
%>

1、用户界面:  

<script  language="JavaScript">      
function  CheckAll(form)      
{for  (var  i=0;i<form.elements.length;i++)      
{var  e  =  form.elements[i];      
if  (e.name  !=  'chkall')      
e.checked  =  form.chkall.checked;      
}      
}      
</script>