国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

ASP中if語句、select 、while循環(huán)的使用方法

2024-05-04 11:10:13
字體:
供稿:網(wǎng)友
這篇文章主要介紹了ASP中if語句、select 、while循環(huán)的使用方法,需要的朋友可以參考下
 
<%@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><%="頁面標(biāo)題"%></title></head><body><%="多條件判斷"%><%response.Write("<br />")response.Write("利用response對(duì)象的Write方法輸出地內(nèi)容!")%><br /><%dim a,ba=200b=300response.Write("兩數(shù)之和為:")response.Write(a+b)response.Write("<br />")if a=100 thenresponse.Write("a=100,第一個(gè)條件滿足。")elseif a=200 thenresponse.Write("a=200,第二個(gè)條件滿足。")elseif a=300 thenresponse.Write("a=300,第三個(gè)條件滿足。")elseresponse.Write("三個(gè)條件都不滿足。")end if%><%response.Write("<br />")dim textnumbertextnumber=200select case textnumber case 100  response.Write("數(shù)值為100, 條件滿足!") case 200  response.Write("數(shù)值為200,條件滿足 !") case 300  response.Write("數(shù)值為300 ,條件滿足!") case else  response.Write("以上條件,條件都不滿足!") end select%><%response.Write("<br />")dim i,sumi=0sum=0 while i<=100 sum=sum+i i=i+1wendresponse.Write("100以內(nèi)所有整數(shù)的和為:")response.Write(sum)%><%response.Write("<br />")dim w,sw=0s=0do s=s+ww=w+1loop while w<=100response.Write("100之內(nèi)的所有整數(shù)之和為:")response.Write(s)response.Write("<br/>")response.Write("w的值是:")response.Write(w)%></body></html>

具體的介紹就不多說了,大家看下實(shí)例就可以了



注:相關(guān)教程知識(shí)閱讀請(qǐng)移步到ASP教程頻道。
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 逊克县| 临安市| 盘锦市| 临朐县| 桦甸市| 裕民县| 阿克陶县| 阳曲县| 怀仁县| 佛坪县| 文水县| 屯门区| 安塞县| 尚志市| 宿迁市| 德阳市| 盖州市| 友谊县| 阳山县| 斗六市| 平邑县| 焉耆| 台北市| 南漳县| 汽车| 商都县| 乐清市| 梁河县| 五大连池市| 万州区| 会理县| 峨眉山市| 青冈县| 五河县| 建水县| 高州市| 铁岭市| 南投市| 呼伦贝尔市| 息烽县| 永吉县|