글 수 300
2006.04.16 22:23:34 (*.105.150.242)
21146
예제보기 https://www.yeoyoo.com/act1.html
입력문서와 출력문서 2개가 필요합니다.
1. 입력할 문서 <body>사이에
<FORM name=form1 ACTION="출력문서 이름">
<table cellpadding="3" cellspacing="1" width="541" bgcolor="#ffccff" align="center"><tr>
<td bgcolor="#F0D3F0" width="533" colspan="4" height="25">
<p align="center"><b>신 청 서</b></td></tr>
<tr><td bgcolor="#EBEBEA" width="91" align="center">
<p><b><font color="black">종 류</font></b></p></td>
<td bgcolor="#EBEBEA" width="249" align="center">
<p><b><font color="black">타 입</font></b></p></td>
<td bgcolor="#EBEBEA" width="80" align="center">
<p><b><font color="black">가 격</font></b></p></td>
<td bgcolor="#EBEBEA" width="92" align="center">
<p><b><font color="black">선 택</font></b></p></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 1
</td>
<td bgcolor="white" width="249" align="center">
<p>쇼핑몰</p></td>
<td bgcolor="white" width="80" align="center">
<p>\50,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 1 " value="\50,000"></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 2 </td>
<td bgcolor="white" width="249" align="center">
<p>학습용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\10,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 2" value="\10,000">
</td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 3 </td>
<td bgcolor="white" width="249" align="center">
<p>개인용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\10,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 3" value="\10,000"></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 4</td>
<td bgcolor="white" width="249" align="center">
<p>회사용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\20,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 4" value="\20,000"></td></tr>
<tr><td align="right" bgcolor="white" width="533" colspan="4">
<INPUT TYPE="submit" value="확인"></td></tr></table>
</FORM>
2. 확인될 문서 <head>사이에
<script>
<!--
var myValueIn = unescape(location.search.replace(/\+/g,' '));
myValueIn = myValueIn.substring(1).split('&');
for(i=0;i<myValueIn.length;i++)
myValueIn[i] = myValueIn[i].split('=');
var myValueOut = "<table cellpadding=3 cellspacing=1 width=450 bgcolor=#999999><tr><td bgcolor=#F0D3F0 colspan=2>신 청 내 역</td></tr>";
myValueOut += "<tr><td bgcolor=white>종류</td><td bgcolor=white>가격</td></tr>";
for(i=0;i<myValueIn.length;i++){
myValueOut += "<tr>\n";
myValueOut += "\t<td bgcolor=white>"+myValueIn[i][0]+" </td>\n";
myValueOut += "\t<td bgcolor=white>"+myValueIn[i][1]+"</td>\n";
myValueOut += "</tr>\n";
}
myValueOut += "</table>\n";
//-->
</script>
<body>사이에는
<script>
document.write(myValueOut);
</script>
입력문서와 출력문서 2개가 필요합니다.
1. 입력할 문서 <body>사이에
<FORM name=form1 ACTION="출력문서 이름">
<table cellpadding="3" cellspacing="1" width="541" bgcolor="#ffccff" align="center"><tr>
<td bgcolor="#F0D3F0" width="533" colspan="4" height="25">
<p align="center"><b>신 청 서</b></td></tr>
<tr><td bgcolor="#EBEBEA" width="91" align="center">
<p><b><font color="black">종 류</font></b></p></td>
<td bgcolor="#EBEBEA" width="249" align="center">
<p><b><font color="black">타 입</font></b></p></td>
<td bgcolor="#EBEBEA" width="80" align="center">
<p><b><font color="black">가 격</font></b></p></td>
<td bgcolor="#EBEBEA" width="92" align="center">
<p><b><font color="black">선 택</font></b></p></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 1
</td>
<td bgcolor="white" width="249" align="center">
<p>쇼핑몰</p></td>
<td bgcolor="white" width="80" align="center">
<p>\50,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 1 " value="\50,000"></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 2 </td>
<td bgcolor="white" width="249" align="center">
<p>학습용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\10,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 2" value="\10,000">
</td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 3 </td>
<td bgcolor="white" width="249" align="center">
<p>개인용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\10,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 3" value="\10,000"></td></tr>
<tr><td bgcolor="white" width="91" align="center">
템플릿 4</td>
<td bgcolor="white" width="249" align="center">
<p>회사용</p></td>
<td bgcolor="white" width="80" align="center">
<p>\20,000</p></td>
<td bgcolor="white" width="92" align="center">
<INPUT TYPE="checkbox" NAME="템플릿 4" value="\20,000"></td></tr>
<tr><td align="right" bgcolor="white" width="533" colspan="4">
<INPUT TYPE="submit" value="확인"></td></tr></table>
</FORM>
2. 확인될 문서 <head>사이에
<script>
<!--
var myValueIn = unescape(location.search.replace(/\+/g,' '));
myValueIn = myValueIn.substring(1).split('&');
for(i=0;i<myValueIn.length;i++)
myValueIn[i] = myValueIn[i].split('=');
var myValueOut = "<table cellpadding=3 cellspacing=1 width=450 bgcolor=#999999><tr><td bgcolor=#F0D3F0 colspan=2>신 청 내 역</td></tr>";
myValueOut += "<tr><td bgcolor=white>종류</td><td bgcolor=white>가격</td></tr>";
for(i=0;i<myValueIn.length;i++){
myValueOut += "<tr>\n";
myValueOut += "\t<td bgcolor=white>"+myValueIn[i][0]+" </td>\n";
myValueOut += "\t<td bgcolor=white>"+myValueIn[i][1]+"</td>\n";
myValueOut += "</tr>\n";
}
myValueOut += "</table>\n";
//-->
</script>
<body>사이에는
<script>
document.write(myValueOut);
</script>