1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

asp求助

本帖由 sanyos2006-05-20 发布。版面名称:后端开发

  1. sanyos

    sanyos New Member

    注册:
    2006-05-20
    帖子:
    1
    赞:
    0
    这个代码总是提示网页有错误,请达人指点,谢谢

    <%@ LANGUAGE = VBScript %>
    <html>
    <head>
    <script language="vbscript">
    sub gen_key(digital)
    dim char_array(80)
    For i = 0 To 9
    char_array(i) = CStr(i)
    Next
    For i = 10 To 35
    char_array(i) = Chr(i + 55)
    Next
    For i = 36 To 61
    char_array(i) = Chr(i + 61)
    Next
    Randomize
    do while len(output) < digital
    num = char_array(Int((62 - 0 + 1) * Rnd + 0))
    output = output & num
    loop
    response.write "本实例生成的十三位随机字符串为:"
    response.write "<center>"
    response.write output
    response.write "</center>"
    end sub
    </script>
    </head>

    <body>
    <form name="gs" action="" method="post">
    <input name="upto" type="button" value="212" size="20" onClick="gen_key(13)">
    </form>
    </body>
    </html>