设计一个猜测数字的页面(使用asp代码)
& lthead & gt
& ltmeta http-equiv = " Content-Type " Content = " text/html;charset=gb2312" />
& lttitle & gt猜数字游戏
& lt/head & gt;
& lt%
dim acc
dim suiji
点心树子
dim tishi
迪姆茨舒
session(" cishu ")= session(" cishu ")+1 ACC = request(" AC ")
如果acc=2,则
使不规则化
session("cishu")=0
session(" suiji ")= int(100 * rnd())
结束if % & gt
& lt%
如果acc=1,则
shuzii=int(request("shuzi "))
if session("suiji")=shuzii then
Tishi= "祝贺你猜对了"
其他
if session(" suiji ")& gt;那就舒兹伊吧
Tishi= "你猜得太少"
其他
Tishi= "你猜对了"
如果…就会结束
如果…就会结束
如果…就会结束
% & gt
& ltbody & gt
& ltform id = " form 1 " name = " form 1 " method = " post " action = " csz . ASP?ac=1 " >
& ltp & gt请为猜数字游戏输入一个介于1-100之间的数字
& ltp & gt
& lt标签& gt
& ltinput type = " text " name = " shuzi "/& gt;
& lt/label & gt;
& lt/p & gt;
& ltp & gt
& lt标签& gt
& ltinput type = " submit " name = " submit " value = " submit "/& gt;
& lt/label & gt;
& lt/p & gt;
& lt/form & gt;
& ltp & gt你* * *猜到了
& ltform name = " form 2 " method = " post " action = " csz . ASP?ac=2 " >
& lt标签& gt
& lt输入type = " submit " name = " submit 2 " value = " start over " >
& lt/label & gt;
& lt/form & gt;
& lt/body & gt;
& lt/html & gt;