본문 바로가기
JAVASCRIPT/동적 SELECT 페이지 이동

SELECT OPTION 변화에 따른 페이지 이동

by 정윤재 2008. 10. 27.

<%@ page language="java" import="java.util.*" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
 <script language="javascript">
   
    function goUrl(url)
    
    {
    
       window.location.href  = url;
    
    }
   
  </script>
</head>
<body>
 <center>

   <select onchange="goUrl(this.options[this.selectedIndex].value)">
       <option value="./a.jsp">--------
      <!--  a.jsp 가 원래 페이지 -->
    <option value="./abc.jsp">abc.jsp
    
    <option value="./bcd.jsp">bcd.jsp
   
   </select>

 </center>
</body>
</html>


댓글