==============================시작 화면========================================
<%@ page language="java" 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">
<script src="http://code.jquery.com/jquery-1.7.js">
</script>
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
$("#ko").click(function(){
var str="?lo=ko&";
str+="id="+$("#id").val();
str+="pw="+$("#pw").val();
alert(str);
location.href="fmt1.jsp"+str
});
$("#en").click(function(){
var str="?lo=en&";
str+="id="+$("#id").val();
str+="pw="+$("#pw").val();
alert(str);
location.href="fmt1.jsp"+str
});
});
</script>
id : <input type="text" id="id">
pw : <input type="text" id="pw">
<a href="#" id="ko">한글</a>
<a href="#" id="en">영어</a>
</body>
</html>
==============================넘어가는 화면=====================================
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<fmt:setLocale value="${param.lo}" />
<fmt:bundle basename="a.b.member" >
<!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>
</head>
<body>
<fmt:message key="MSG"><br>
<fmt:param value="${param.id}"></fmt:param>
<fmt:param value="${param.pw}"></fmt:param>
</fmt:message>
</body>
</html>
</fmt:bundle>
================================ko==================================================
MSG=\uC544\uC774\uB514 : {0} , \uBE44\uBC88 : {1}
================================en=================================================
MSG=ID : {0} , PW : {1}
자바 상대방에서 파일 전송 하기 awt 안씀 (1) | 2015.03.19 |
---|---|
자바 설정언어에 따라 버튼이랑 타이틀 언어 바뀌게 하기 (0) | 2015.03.19 |
자바 jsp 정규표현식 언어 포맷형식을 한국어와 영어로 바꾸는 (0) | 2015.03.19 |
JQGrid 이용해서 테이블 수정 삭제 추가 해보기 (1) | 2015.03.17 |
JSTL forEach문에 varStatus 사용하기 (0) | 2015.03.12 |