코드에서 JSP에 대한 변수를 작성하는 중입니다.
답변에 요소를 만들어 액세스 할 수 있습니다. 같은 :
<div id="var">value</div> <---JSP have to reply that.
<div id="var"><%= var.value() %></div> <--- exemple of JSP code to produce the answer u need.
그리고 브라우저에서 실행 JQuery와 $ ("# var에") <을 --- 사용할 수 있습니다.
원하는 경우 CSS를 사용하여 숨길 수 있습니다.
또는 Ajax를 옵션으로 사용할 수 있습니다.
아약스 :
$.ajax({
type: 'GET',
url: 'xxxx', <-- your url
success: function(reply) {
Alert(reply); <-- just for you to see the reply, u can do whatever..
}
});
$ (회신), 구문 분석 또는 액세스 물건에 도움을 줄 수.
<div id="var">value</div> <---JSP have to reply that.
자원 예 :이 옵션을 사용하는 것 외에
는
, UR URL은 같은 것을 답장을 할 수있는 자원을 가리 키도록해야
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<% SomeVariableClass var = SomeVariableClass.getInstance()%>
<div id="var"><%=var.getValue()%></div>
</body>
환호
아약스로 어떻게 할 수 있을까요? – Vanguard