Showing
2 changed files
with
45 additions
and
0 deletions
views/inf_search_home.ejs
0 → 100644
1 | +<html> | ||
2 | + <head> | ||
3 | + <title>TESTESTEST</title> | ||
4 | + | ||
5 | + <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script> | ||
6 | + <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script> | ||
7 | + </head> | ||
8 | + <body> | ||
9 | + <input type="text" id="name" /> | ||
10 | + <input type="submit" onClick="location.href='result'" id="OK"/> | ||
11 | + | ||
12 | + <script> | ||
13 | + $("#OK").click(function(){ // OK 버튼 클릭하면 | ||
14 | + $.ajax({ | ||
15 | + url: '/inf/result', // postTest 주소로 | ||
16 | + async: true, // 동기화 - 서버에서 반응이 올때까지 기다림 | ||
17 | + type: 'POST', // POST 방식으로 | ||
18 | + data: { | ||
19 | + test: $("#name").val() // 텍스트필드에 입력한 값을 test라는 이름으로 보냄 | ||
20 | + }, | ||
21 | + dataType: 'json' | ||
22 | + }); | ||
23 | + }); | ||
24 | + </script> | ||
25 | + </body> | ||
26 | +</html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
views/inf_search_result.ejs
0 → 100644
1 | +<!DOCTYPE html> | ||
2 | +<html> | ||
3 | + <head> | ||
4 | + <meta charset="utf-8"> | ||
5 | + <title>Hello World!</title> | ||
6 | + <!-- | ||
7 | + <link rel="stylesheet" href="/css/master.css" > | ||
8 | + --> | ||
9 | +</head> | ||
10 | + <body> | ||
11 | + <h1>유저 정보 출력</h1><br> | ||
12 | + <script> | ||
13 | + </script> | ||
14 | + <span class="aid">USER ID<%= aid %></span><br> | ||
15 | + <span class="name">NAME<%= name %></span><br> | ||
16 | + <span class="level">LEVEL<%= level %></span> | ||
17 | + | ||
18 | + </body> | ||
19 | +</html> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment