<html>
<script language="VB" runat="server">Private  Sub onDecrypt(ByVal sender As Object, ByVal e As EventArgs)
Response.Write(Decrypt(test.value))
End SubPrivate Function Decrypt(str)
Dim chrArr as char()=str.ToCharArray()
dim i as Integer
Dim ret as String=""
For i=0 to  test.value.length-1 step 2
ret=ret & ChrW(AscW(chrArr(i))-AscW(chrArr(i+1)))
Next
Decrypt=ret
End Function
</script>
</head>
<body>
<form runat="server">
<input type=text id=test value=中文Abc runat="server">
<input type=submit runat="server" onclick="test.value=Encrypt(test.value)" onserverclick="onDecrypt">
</form>
<script>
function Encrypt(theText) 

   output = new String; 
   Temp = new Array(); 
   Temp2 = new Array(); 
   TextSize = theText.length; 
   for (i = 0; i < TextSize; i++) 
     { 
        rnd = Math.round(Math.random() * 122) + 68; 
        Temp[i] = theText.charCodeAt(i) + rnd; 
        Temp2[i] = rnd; 
     } 
   for (i = 0; i < TextSize; i++) 
    { 
        output += String.fromCharCode(Temp[i], Temp2[i]); 
    } 
   return output; 
}
</script>
</body>
</html>