프로그래밍/- JSP , Servlet
JavaScript를 사용하여 A 페이지를 가져와서 변수에 담기
즐겁게 하하하
2024. 4. 23. 10:52
728x90
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
var responseText = decodeURIComponent(escape(this.responseText)); // UTF-8로 디코딩
wrptContent.setData(responseText);
}
};
xhttp.open("GET", "baseWeeklyContent.do", true); // A 페이지의 경로를 설정
xhttp.setRequestHeader("Content-Type", "text/html; charset=utf-8"); // UTF-8로 설정
xhttp.send();
// 주간보고 기본 내용 html
@RequestMapping(value = "/rpt/weekly/baseWeeklyContent.do", method = RequestMethod.GET)
public String baseWeeklyContent(
@ModelAttribute("searchVO") SearchVO searchVO,
Model model, HttpServletRequest request) throws Exception {
return "none/baseWeeklyContent";
}
<table style="margin:30px;">
<tbody>
<tr>
<td style="width:600px;height:26px;">■ 금주 진행 ( 월 일 ~ 월 일 )</td>
</tr>
<tr>
<td style="width:600px;height:134px;">
1.
<ul>
<li> </li>
<li> </li>
</ul>
<br/>
2.
<ul>
<li> </li>
<li> </li>
</ul>
</td>
</tr>
</tbody>
</table>
728x90