标题:在ASP中response.write方法中可直接使javasctipt函数吗?请高手指教。
只看楼主
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:0 
conn.asp这里面也没有?
2010-02-09 08:49
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:0 
测试了下 确实是asp(vbscript)自带的函数(方法)
2010-02-09 08:54
aspic
Rank: 17Rank: 17Rank: 17Rank: 17Rank: 17
等 级:贵宾
威 望:51
帖 子:2258
专家分:8050
注 册:2008-2-18
得分:0 
程序代码:
<%
Response.Expires = -1 
Response.ExpiresAbsolute = Now() - 1 
Response.CacheControl = "no-cache"
Response.Charset = "UTF-8"

For i = 0 To 10
    Response.Write "escape:"&escape("吼吼"&i) & "------------->"
    Response.Write "unescape:"&unescape(escape("吼吼"&i))&"<br />"
Next
%>
结果如下
程序代码:
escape:%u935A%u714E%u60E30------------->unescape:吼吼0
escape:%u935A%u714E%u60E31------------->unescape:吼吼1
escape:%u935A%u714E%u60E32------------->unescape:吼吼2
escape:%u935A%u714E%u60E33------------->unescape:吼吼3
escape:%u935A%u714E%u60E34------------->unescape:吼吼4
escape:%u935A%u714E%u60E35------------->unescape:吼吼5
escape:%u935A%u714E%u60E36------------->unescape:吼吼6
escape:%u935A%u714E%u60E37------------->unescape:吼吼7
escape:%u935A%u714E%u60E38------------->unescape:吼吼8
escape:%u935A%u714E%u60E39------------->unescape:吼吼9
escape:%u935A%u714E%u60E310------------->unescape:吼吼10
2010-02-09 09:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-297417-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.190471 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved