root/okpoll/WebContent/inputItem.jsp

리비전 5, 1.3 kB (mefour에 의해 체크인됨, 16 년 전)

--

  • svn:mime-type 속성이 text/plain (으)로 설정되어있습니다.
Line 
1 <%@ page language="java" contentType="text/html; charset=EUC-KR"
2     pageEncoding="EUC-KR"%>
3 <%
4         request.setCharacterEncoding("euc-kr");
5
6         String question = request.getParameter("question");
7 %>
8 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
9 <html>
10 <head>
11         <meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
12         <title>답변입력</title>
13         <script type="text/javascript">
14         var addItem = function() {
15                 var li = document.createElement("li");
16                 var input = document.createElement("input");
17                 input.setAttribute("name", "item");
18                 input.className = "item";
19                 li.appendChild(input);
20                 var last = document.getElementById("last");
21                 var ul = last.parentNode;
22                 ul.insertBefore(li, last);
23         };
24         </script>
25         <style type="text/css">
26         .item {
27                 width: 400px;
28         }
29         #last {
30                 display: none;
31         }
32         </style>
33 </head>
34 <body>
35 <h1>답변입력</h1>
36 <h2>* 답변을 입력하세요</h2>
37 <h2>* Q : <%= question %></h2>
38 <form name="f_group" action="pollSave.jsp" method="post">
39         <input type="hidden" name="question" value="<%= question %>"></input>
40         <ul id="list">
41                 <li><input type="text" name="item" class="item"></li>
42                 <li id="last"></li>
43         </ul>
44         <input type="button" value="답변항목추가" onclick="addItem()">
45         <input type="submit" value="설문입력완료"><br>
46 </form>
47 </body>
48 </html>
참고: 소스 브라우저를 사용하면서 도움이 필요하다면, TracBrowser를 참고하십시오.