JS加载JSP的问题
在a.jsp中,
<c:if test="${isShowTable == 'y'}">
<div id="listTable"><jsp:include flush="false" page="fxComplaintMatchedByPhone.jsp" /></div>
</c:if>
根据request中的isShowTable 来判断时候要显示这个jsp页面,但是如果想把这段代码放到JS中,如何写?
if(isShowTable == 'y'){
document.write('<div id="listTable"><jsp:include flush="false" page="fxComplaintMatchedByPhone.jsp" /></div>');
}
这样的话,在成功加载a.jsp之后,是不是显示的就只有fxComplaintMatchedByPhone.jsp的内容,而a.jsp中原来的内容就没有了?
应该怎么办?