首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

为什么这个简单调用函数的asp程序,运行异常

2012-03-16 
为什么这个简单调用函数的asp程序,运行错误?%FunctionRegExpTest(patrn,strng)DimregEx,Match,Matches建

为什么这个简单调用函数的asp程序,运行错误?
<%
Function   RegExpTest(patrn,   strng)
    Dim   regEx,Match,Matches                   '   建立变量。
    Set   regEx   =   New   RegExp                   '   建立正则表达式。
    regEx.Pattern   =   patrn                   '   设置模式。
    regEx.IgnoreCase   =   True                   '   设置不区分大小写。
    regEx.Global=True                                                           '   设置全局可用性
    set   matches=regExExecute(string)                           '   执行搜索。
    for   each   match   in   matches                                           '   重复匹配集合
    RetStr=RetStr   & "Match   found   at   position   "
    RetStr=RetStr&Match.FirstIndex& ".Match   Value   is   ' "
    RetStr=RetStr&Match.Value& " '. "&vbCRLF  
    Next
    RegExpTest=RetStr
End   Function
MsgBox(RegExpTest( "is. ",   "IS1   is2   IS3   is4 "))
%>
我就是直接把上面的存为一个asp文件执行出错的。

[解决办法]
server端不能msgbox()
[解决办法]
MsgBox(RegExpTest( "is. ", "IS1 is2 IS3 is4 "))

----

MsgBox()函数 在服务器端是没有权限执行的
[解决办法]
用response.write
呵呵,msgbox
最近用javascript用疯了,好像比较遥远了

热点排行