Javascript批量定义页面元素鼠标事件
作者:admin 日期:2012-04-26
ASP中循环语句使用实例
作者:admin 日期:2012-04-26
ASP基础实例教程之ASP中循环语句使用实例
实例一:do....loop (当条件为True(或者条件为True)时循环)
运行结果:Test1While()循环重复了10次,Test2While()循环重复了1次,Test1Until()循环重复了11次,Test2Until()循环重复了10次
CODE:
<%@language="vbscript" codepage="936"%>
<html>
<head>
<title>do....loop几种用法</title>
</head>
<body>
<%
Sub Test1While()
dim counter,myNum
counter=0
myNum=20
do while myNum>10
myNum=myNum-1
counter=counter+1
loop
Response.Write"Test1While()循环重复
Asp利用字符串处理多个空格只保留一个
作者:admin 日期:2012-04-26
Do while实现:
- <%
- text="你 好 世 界!"
- x=0
- do while x=1
- text=replace(text," "," ")
- if instr(text," ")<0 then
- x=1
- end if
- loop
- response.Write(text)
While wend实现:
- text="你 好 世 界!"
- x=0
- while not x=0
- text=replace(text," "," ")
- if instr(text," ")<0 then
- x=1
- end if
- wend
- response.Write(text)
原创代码,转载请注明出处,谢谢!
更多Asp循环语句可参考:https://blog.guanjianci.net/article.asp?id=548
Asp从长关键字中提取关键字根
作者:admin 日期:2012-04-26
广告位