新人弱弱的问下局部刷新问题~~
假设有A.htm、B.htm两页,A.htm:
<div id=aaa></div><iframe width=0 height=0src=b.htm></iframe>
B.htm:
<script>parent.aaa.innerHTML='test!'</script>
那我如何在A页面刷新B页面呢?
[解决办法]
<c:if test="${!empty(requestScope.path)}">
<script>
parent.document.getElementById("path").value="${requestScope.path}";
parent.document.getElementById("view").innerHTML="<img src="${pageContext.request.contextPath}/${requestScope.path}" height='200 width='200'/> "
</script>
</c:if>
[code=text]
<tr>
<td>
图片
</td>
<td>
<iframe
src="${pageContext.request.contextPath }/upload.jsp?path=${requestScope.product.path}"
width="100%" height="25" marginheight="0" marginwidth="0"
scrolling="no" frameborder="0"></iframe>
</td>
</tr>
<tr>
<td>
浏览
</td>
<td id="view">
<c:if test="${empty(requestScope.product.path )}">
</c:if>
<c:if test="${!empty(requestScope.product.path)}">
<img
src="${pageContext.request.contextPath }/${requestScope.product.path}"
width="200" height="200" />
</c:if>
</td>
</tr>