孤独的猫

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

可用Request.ServerVariables("Request_Method")="POST"判断是否提交,如下dice.asp页面

<html>

    <head><title>测试Request_Method</title></head>

    <body>

    <%

        Session("point")=6

        If Request.ServerVariables("Request_Method")="POST" then

    %>

    <form method="POST" action="dice.asp">

    <p>当色子的面数为<input type="text" name="T1" size="5" value=<%=session("point") %>>时</p>

    <p><input type="submit" value="掷色子" name="B1"></p>

    </form>

    <p>掷色子的结果为:5点</p>

    <%

        Else

    %>

    <form method="POST" action="dice.asp">

    <p>当色子的面数为<input type="text" name="T1" size="5" value=<%=session("point") %>>时</p>

    <p><input type="submit" value="掷色子" name="B1"></p>

    </form>

    <%

        end if

    %>

    </body>

</html>

    

posted on 2008-09-19 14:21  孤独的猫  阅读(187)  评论(0编辑  收藏  举报