다른 페이지의 상자 (또는 포함 된 영역)에 표시하려고하는 전체 HTML 페이지가 포함 된 HTTP 포스트 리턴이 있습니다. 나는 프레임 또는 iFrame을 통해 임시 문서로 저장 한 다음 다시 표시하는 방법에 대해 생각해 봤지만 회상으로 보입니다. 나는 더 우아한 해결책이 있기를 바라고 있습니다.전체 HTML 페이지 내의 상자에 전체 HTML 페이지를로드하는 방법
다음은 서버의 파일에 먼저 저장하지 않고 다른 HTML 페이지에 표시하려는 HTML의 예입니다.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head></head>
<script language="javascript">
function openWin(page,win_width,win_height){
try {popup_window.close();} catch(e){}if (page.indexOf("mailto") == -1) {
var options ="scrollbars=yes, width=" + win_width + ", height=" + win_height;
var win = window.open(page, 'MyWin', options);
if (window.focus) { win.focus() }}}
</script>
<body bgcolor="#E5E5E5">
<table cellspacing="0" cellpadding="0">
<tr>
<td style="font-family:Arial;font-size:13px;color:#000000;font-weight:bold;">Thank You</td>
</tr>
<tr><td height="10px;"></td></tr>
<tr>
<td style="font-family:Arial;font-size:12px;color:#000000;">Representatives from the following companies will be contacting you soon.</td>
</tr>
<tr><td height="10px;"></td></tr>
<tr><td><table id="someTable" cellspacing="0" cellpadding="0">
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<img src="http://someurl.com/somepic.gif" border="0" alt="TEXT" title="TEXT"/>
</td>
</tr>
<tr>
<td align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
TEXT
</td>
</tr>
<tr>
<td valign="top" align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
<a href="javascript:openWin('http://someurl.jsp','517','460');" title="More Information">More Information</a>
</td>
</tr>
</table>
</td>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<img src="http://someurl.com/somepic.gif" border="0" alt="TEXT" title="TEXT"/>
</td>
</tr>
<tr>
<td align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
TEXT
</td>
</tr>
<tr>
<td valign="top" align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
<a href="javascript:openWin('http://someurl.jsp','517','460');" title="More Information">More Information</a>
</td>
</tr>
</table>
</td>
<td>
<table cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table cellspacing="0" cellpadding="0" width="140px;"><tr><td width="140px;"><img src="http://someurl.com/somepic.gif" border="0" alt="TEXT" title="TEXT"/></td></tr></table>
</td>
</tr>
<tr>
<td align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
Text
</td>
</tr>
<tr>
<td valign="top" align="center" style="font-family:Arial;font-size:12px;color:#000000;padding-top:5px;">
<a href="javascript:openWin('http://someurl.jsp','517','460');" title="More Information">More Information</a>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="10px;"></td></tr>
</table></td></tr></table>
<table style="display:none"><tr><td><input type="hidden" id="XXDataCaptureKey" value="12345" /><input type="hidden" id="DATA" value="data" /></td><tr></table>
<!-- ******** XX RESPONSE *********
* KEY: 12345
* DATA: data
* STATUS: SUCCESS
*****************
-->
</body></html>
사용해 주셔서 감사합니다.
에 그것을 봉사 할 수 있었다 iframe src = "thispage.aspx/innerpage">'또는 무엇인가. 그러나 더 나은 해결책이 있습니다. 단지 목적에 따라 단순하지 않을 수도 있습니다. – Ryan
동적으로 반향을 일으키는 방법은 무엇입니까? – Rob
사용하는 서버 측 언어를 사용하여 페이지의 URL을 가져오고'.aspx' (또는'.php' 또는'.cgi' 등) 다음에 해당 부분을 가져 와서 해당 부분을 기반으로 내용을 에코합니다. – Ryan