侣行第一季 百度云:网页中的中文字符串加密

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 04:19:27
怎么给网页中的中文字符串加密,就是让别人看源代码时显示的是字符或者数字或者乱码,而代码其他正常!
有没有其他的办法?

<%
function chinese2unicode(Str)
dim i
dim Str_one
dim Str_unicode
if(isnull(Str)) then
exit function
end if
for i=1 to len(Str)
Str_one=Mid(Str,i,1)
Str_unicode=Str_unicode&chr(38)
Str_unicode=Str_unicode&chr(35)
Str_unicode=Str_unicode&chr(120)
Str_unicode=Str_unicode& Hex(ascw(Str_one))
Str_unicode=Str_unicode&chr(59)
next
chinese2unicode=Str_unicode
end function
%>
<%=chinese2unicode("我靠")%>

不知道你要的是不是这个!

使用escape()