ClassicASP for 문 이용 requst 결과를 한개로 만들기
페이지 정보
본문
#### step1.asp ####
<form name="hpwrite" action="step2.asp" method="post">
<%
dim i, kkk
kkk = 5
for i = 1 to kkk step 1
%>
<input type="text" name="aaa<% response.write i %>" value="" />
<%
next
%>
<input type="submit" value=" 확인 " />
</form>
#### step2.asp ####
<%
dim i, kkk, bbb, ccc
for i = 1 to kkk step 1
bbb = request("aaa" & i)
if i = 1 then
ccc = bbb
else
ccc = ccc & "|" & bbb
end if
next
response.write "ccc = "& ccc &"<br>"
%>
결과
ccc = aaa1|aaa2|aaa3|aaa4|aaa5
<form name="hpwrite" action="step2.asp" method="post">
<%
dim i, kkk
kkk = 5
for i = 1 to kkk step 1
%>
<input type="text" name="aaa<% response.write i %>" value="" />
<%
next
%>
<input type="submit" value=" 확인 " />
</form>
#### step2.asp ####
<%
dim i, kkk, bbb, ccc
for i = 1 to kkk step 1
bbb = request("aaa" & i)
if i = 1 then
ccc = bbb
else
ccc = ccc & "|" & bbb
end if
next
response.write "ccc = "& ccc &"<br>"
%>
결과
ccc = aaa1|aaa2|aaa3|aaa4|aaa5
댓글목록
등록된 댓글이 없습니다.