<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<script language=vbscript>
Function CfsEnCode(CodeStr)
Dim CodeLen
Dim CodeSpace
Dim NewCode
CodeLen = 30
CodeSpace = CodeLen - Len(CodeStr)
If Not CodeSpace < 1 Then
For cecr = 1 To CodeSpace
CodeStr = CodeStr & Chr(21)
Next
End If
NewCode = 1
Dim Been
For cecb = 1 To CodeLen
Been = CodeLen + Asc(Mid(CodeStr,cecb,1)) * cecb
NewCode = NewCode * Been
Next
CodeStr = NewCode
NewCode = Empty
For cec = 1 To Len(CodeStr)
NewCode = NewCode & CfsCode(Mid(CodeStr,cec,3))
Next
For cec = 20 To Len(NewCode) - 18 Step 2
CfsEnCode = CfsEnCode & Mid(NewCode,cec,1)
Next
End Function
Function CfsCode(Word)
For cc = 1 To Len(Word)
CfsCode = CfsCode & Asc(Mid(Word,cc,1))
Next
CfsCode = Hex(CfsCode)
End Function
sub checkuser()
a=document.form1.pass.value
document.form1.pass.value=CfsEnCode(a)
msgbox(CfsEnCode(a))
form1.submit
end sub
</script>
</head>
<body>
<form name="form1" method="post" action="4.asp">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input name="username" type="text" id="username">
</td>
</tr>
<tr>
<td><input name="pass" type="password" id="pass">
<input name="text1" type="text" id="text1"></td>
</tr>
<tr>
<td><input type="submit" name="Submit" value="提交" onClick="checkuser()">
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
[此贴子已经被作者于2004-06-21 15:05:36编辑过]