<% function decrypt(dcode) dim texts dim i for i=1 to len(dcode) texts=texts & chr(asc(mid(dcode,i,2))-i) next decrypt=texts end function function encrypt(ecode) dim texts dim i for i=1 to len(ecode) texts=texts & chr(asc(mid(ecode,i,2))+i) next encrypt = texts end function dim str str = "neok" Response.Write("加密前:" + str + "<br>") Response.Write("加密后:" + encrypt(str) + "<br>") Response.Write("解密:"+ decrypt(encrypt(str))) %>