zoukankan      html  css  js  c++  java
  • ASP 基础一 基本语法

    一 声明变量

    二 给变量赋值

    三 循环

    四 case

    <html>
    <head title="test hello world">
    </head>
    <%  dim a
        dim b
        a=2
        b=2
    
        if a=2 and b=2 then
            response.Write("ok")
        elseif a=1 and b=1 then
            response.Write("ok1")   
        else
            response.Write("no")
        end if
    %>
    <%
        dim c
        c=21
        select case c
        case 1
            response.Write(1)    
        case 2
            response.Write(2)    
        case 3
            response.Write(3)    
        case else
            response.Write("else  else   ")
        end select
    %>
    <%
        dim d
        d=1
        do while d<10
            response.Write(d)
    
            if d=4 then
                 exit do
            end if
    
            d=d+1
        loop    
    %>
    <%
        sub dosome()
            dim e
            e=1
            for e=1 to 10 step 2
                 if e=4 then
                     exit for
                end if
                response.Write(e)
            next
        end sub
    
        dosome()
    %>
    <body>
        <form method="post" action="simpleform.asp">
            <p>
                First Name:
                <input type="text" name="fname" />
            </p>
            <p>
                Last Name:
                <input type="text" name="lname" />
            </p>
            <input type="submit" value="Submit" />
        </form>
    </body>
    
    
    </html>
    天生我材必有用,千金散尽还复来
  • 相关阅读:
    @atcoder
    @loj
    @atcoder
    @gym
    @codeforces
    @atcoder
    @bzoj
    @loj
    Kafka常用命令
    Kafka入门介绍
  • 原文地址:https://www.cnblogs.com/ligenyun/p/7610466.html
Copyright © 2011-2022 走看看