内容简介:这篇文章主要介绍了ASP中if语句、select 、while循环的使用方法,需要的朋友可以参考下
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title><%="页面标题"%></title> </head> <body> <%="多条件判断"%> <% response.Write("<br />") response.Write("利用response对象的Write方法输出地内容!") %> <br /> <% dim a,b a=200 b=300 response.Write("两数之和为:") response.Write(a+b) response.Write("<br />") if a=100 then response.Write("a=100,第一个条件满足。") elseif a=200 then response.Write("a=200,第二个条件满足。") elseif a=300 then response.Write("a=300,第三个条件满足。") else response.Write("三个条件都不满足。") end if %> <% response.Write("<br />") dim textnumber textnumber=200 select case textnumber case 100 response.Write("数值为100, 条件满足!") case 200 response.Write("数值为200,条件满足 !") case 300 response.Write("数值为300 ,条件满足!") case else response.Write("以上条件,条件都不满足!") end select %> <% response.Write("<br />") dim i,sum i=0 sum=0 while i<=100 sum=sum+i i=i+1 wend response.Write("100以内所有整数的和为:") response.Write(sum) %> <% response.Write("<br />") dim w,s w=0 s=0 do s=s+w w=w+1 loop while w<=100 response.Write("100之内的所有整数之和为:") response.Write(s) response.Write("<br/>") response.Write("w的值是:") response.Write(w) %> </body> </html>
具体的介绍就不多说了,大家看下实例就可以了
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
圈圈教你玩USB
刘荣 / 2013-4 / 59.00元
通过U盘、USB鼠标、15SB键盘、USBMIDI键盘、USB转串口、自定义的USBHID设备和自定义的USB设备等几个具体的USB例子,一步步讲解USB设备及驱动程序和应用程序开发的详细过程和步骤。第9和10章介绍USBWDM驱动开发,并给出一个简单的USB驱动和USB上层过滤驱动的实例。第2版中新增4章内容,包括USB触摸屏设备、移植到AVR单片机和ARM微控制器上以及更多的USB设备的实现。......一起来看看 《圈圈教你玩USB》 这本书的介绍吧!