ํ‹ฐ์Šคํ† ๋ฆฌ ๋ทฐ

์นดํ…Œ๊ณ ๋ฆฌ ์—†์Œ

idsearch3.jsp

๐Ÿฉท ์Šˆ ๐Ÿงก 2010. 6. 23. 21:33
728x90
SMALL

<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ page import="member.MemberMgr" %>s
<%
//ํŒŒ๋ผ๋ฏธํ„ฐ ์ฝ์ž
String id = request.getParameter("id");
if ( id == null || id.trim().length() == 0 ){
 %>
 <script type="text/javascript">
 alert("์•„์ด๋””๋ฅผ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”");
 self.close();
 </script>
 <%
 return;//์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ถœ๋ ฅํ•˜๊ณ  ์‹คํ–‰์ค‘์ง€
}//if end

//๊ฒ€์ƒ‰์„ ์œ„ํ•œ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑ
MemberMgr mgr = new MemberMgr();

//๊ฒ€์ƒ‰ํ•˜๊ธฐ ์œ„ํ•ด ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ๊ฐ€์ง€๊ณ  ๋ฉ”์†Œ๋“œ ํ˜ธ์ถœ
boolean result = mgr.isDuple(id);
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>์ค‘๋ณต ์•„์ด๋”” ์กฐํšŒ</title>
<script language=javascript>
function myChoice(newID){
  //์‚ฌ์šฉ์ž๊ฐ€ ์„ ํƒํ•œ ์•„์ด๋””๋ฅผ ๋ณธ ํ™”๋ฉด์— ์ž…๋ ฅํ•˜๊ณ  ํฌ์ปค์Šค๋Š”
  //์•”ํ˜ธ์นธ์œผ๋กœ ์˜ฎ๊ธฐ๋Š” ํ•จ์ˆ˜
  opener.document.form1.id.value = newID;
  //opener.document.form1.id.disabled = true;
  opener.document.form1.pwd.focus();
  self.close(); //์ผ ๋‹คํ–ˆ์œผ๋ฉด ์ฐฝ์€ ๋‹ซ๋Š”๋‹ค.
}
</script>
</head>
<body>

<form name=form1 method=post action=id_search3.jsp>
<table border=1 cellpadding=5 cellspacing=0 width=500 align=center>
  <tr>
     <td align=center>
     ์‚ฌ์šฉํ•˜์‹ค ์•„์ด๋”” <br>
     <input type=text name=id size=20 value="<%=id %>">
     <input type=submit value="๊ฒ€์ƒ‰">
     <br>
     <div style="border:1 solid blue;">
     <%if( result ){ %>
        ์š”์ฒญํ•˜์‹  ์•„์ด๋”” '<b><%=id %></b>'์€ ์ด๋ฏธ ์‚ฌ์šฉ์ค‘์ž…๋‹ˆ๋‹ค.
        <input type=button value="์ฐฝ๋‹ซ๊ธฐ"
        onClick="self.close()">
     <%}else { %>
        ์š”์ฒญํ•˜์‹  ์•„์ด๋”” '<b><%=id %></b>'์€ ์‚ฌ์šฉํ•˜์…”๋„ ๋ฉ๋‹ˆ๋‹ค.
        <input type=button value="์‚ฌ์šฉํ•˜๊ธฐ"
        onClick="myChoice('<%=id %>')">
     <%}//if else end %>
    
     </div>
     </td>
  </tr>
</table>
</form>
</body>
</html>

728x90
LIST
๋Œ“๊ธ€
it,์Šˆ2008/2/14 Start...
๊ณต์ง€์‚ฌํ•ญ
์ตœ๊ทผ์— ์˜ฌ๋ผ์˜จ ๊ธ€
์ตœ๊ทผ์— ๋‹ฌ๋ฆฐ ๋Œ“๊ธ€
Total
Today
Yesterday
๋งํฌ
ยซ   2025/05   ยป
์ผ ์›” ํ™” ์ˆ˜ ๋ชฉ ๊ธˆ ํ† 
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
๊ธ€ ๋ณด๊ด€ํ•จ
250x250