我有一个HTTP Post Return,它包含一个完整的HTML页面,我试图在另一个页面的框(或包含区域)中显示。我曾想过将它保存为临时文档,然后通过Frame或iFrame重新显示......但这似乎令人费解。我希望有一个更优雅的解决方案。
以下是我尝试在另一个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>
感谢您一起来看看!
答案 0 :(得分:0)
你可以在&lt; object src =“index.html”&gt;中提供它元件