日期:2011-06-22 浏览次数:21108 次
HelloWorld_1.asp 
<%="Hello,world"%> 
效果: 
Hello,world 
HelloWorld_2.asp 
<% 
for i=1 to 10 
response.write "Hello,world" 
next 
%> 
request_url.asp 
<% 
'获取用户输入,并存入变量 
user_id=request.querystring("user_id") 
user_name=request.querystring("user_name") 
'判断用户输入是否正确 
if user_id="" then 
response.write "User_id is null,please check it" 
response.end 
end if 
if user_name="" then 
response.write "User_name is null,please check it" 
response.end 
end if 
'打印变量 
response.write user_id&"<br>" 
response.write user_name 
%> 
request_form.htm 
<style type="text/css"> 
<!-- 
.input {background-color: #FFFFFF; border-bottom: black 1px solid;border-left: black 1px solid; border-right: black 1px solid;border-top: black 1px solid; color: #000000;font-family: Georgia; font-size: 9pt;color: midnightblue;} 
a:link {color: #1B629C; text-decoration: none} 
a:hover {color: #FF6600; text-decoration: underline} 
a:visited {text-decoration: none} 
--> 
</style> 
<center> 
<form name="course" action="request_form.asp" method="post"> 
User_id:<input type="text" name="user_id" maxlength="20" class="input"><br><br> 
User_name:<input type="text" name="user_name" maxlength="30" class="input"> 
</form> 
<br><br> 
<a href="javascript:document.course.submit();"> 提 交 </a> 
</center> 
request_form.asp 
<% 
'获取用户输入,并存入变量 
user_id=request.form("user_id") 
user_name=request.form("user_name") 
'判断用户输入是否正确 
if user_id="" then 
response.write "User_id is null,please check it" 
response.end 
end if 
if user_name="" then 
response.write "User_name is null,please check it" 
response.end 
end if 
'打印变量 
response.write user_id&"<br>" 
response.write user_name 
%> 
response_redirect.asp 
<% 
'去google看看吧 
response.redirect "http://www2.google.com" 
response.end 
%> 
response_cookies.asp 
<% 
'设置和读取cookies 
response.cookies("time_now")=now() 
response.write request.cookies("time_now") 
%> 
response_buffer.asp 
<%'respons