我很难让我的iframe显示我的html字符串恰好是:
var='<BODY style="MARGIN: 0px" bgColor=#ffffff marginwidth="0" marginheight="0">
<SCRIPT language=JavaScript>
var Caller_User_Type = 'ESS';
var Locale_Date_Order = '2';
var User_Browser_Type = '';
var Page_ID = '266';
</SCRIPT>
<SCRIPT language=javascript>
var wlocationxx = '';
wlocationxx = String(window.location);
if (wlocationxx.substring(0,7) == 'http://'){
window.location = 'https://' + wlocationxx.substring(7)
}
</SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="../../../System/CONFIG/Common_Functions.js"></SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="../../../scripts/modeling_script.js"></SCRIPT>
<TABLE id=PageStart_1 border=0 cellSpacing=0 cellPadding=0 width="100%" height="100%">
<TBODY>
<TR>
<TD height="100%" vAlign=top>
<TABLE id=PageStart_2 border=0 cellSpacing=0 cellPadding=0 width="100%" height="100%" valign="top">
<TBODY>
<TR>
<TD height="1%" width="100%">
<SCRIPT language=javascript src="../../../System/EXB/EXB_Includes/logout.js"></SCRIPT>
<SCRIPT language=javaScript src="../../../System/EXB/EXB_Includes/EXB_cookie_factory.js"></SCRIPT>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%" bgColor=#000063>
<TBODY>
<TR bgColor=#000066>
<TD bgColor=#000066 height=60 vAlign=center colSpan=2><IMG src="../../../System/EXB/EXB_Images/exb_login/mckinseyLogo.gif" width=212 height=23> </TD>
<TD bgColor=#000066 vAlign=center align=right><FONT color=white size=2 face="Arial Rounded MT Bold">myaccount.mckinsey.com</FONT> </TD></TR>
<TR>
<TD><IMG src="../../../System/EXB/EXB_Images/mck_racing_stripe.gif" width=309 height=3></TD>
<TD width="100%"><IMG src="../../../System/EXB/EXB_Images/mck_racing_stripe.gif" width="100%" height=3></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!-- begin exb_global.asp --><!-- end exb_global.asp -->
<SCRIPT type=text/javascript src="../../../System/EXB/EXB_Includes/Menu/HM_Config_Common.js"></SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="../../../System/EXB/EXB_Includes/Menu/HM_mnu_functions.js"></SCRIPT>
<SCRIPT language=JavaScript type=text/javascript src="../../../System/EXB/EXB_Includes/Menu/HM_dummy_functions.js"></SCRIPT>
<SCRIPT type=text/javascript>var sHMConfigContent = "SetUpdateDefaults('300375');HM_TopLevelMenuId=\"hmExbDCPart\";nMenuItems=0;sHM_f_SetItems=\"\";sHM_f_SetItems=\"\";sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Home\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Home.asp\",true,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Select Plan\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Part_Plan_Select.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Account Menu\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Home.asp\",false,\"hmExbDCPart_AccountMenu\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Withdrawals\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Distribution_Security.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Annual Decisions\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Rebalance_Elections_View.asp\",false,\"hmExbDCPart_AnnualDecisions\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Administration\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Personal_Profile.asp\",false,\"hmExbDCPart_Administration\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Contact Us\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Contact_us.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart\",\"Log Off\",\"\",\"65\",\"24\",\"\",\"\",\"javascript:User_Log_Off()\",false,\"\");if(sHM_f_SetItems!=\"\"){var sTopMenuY=\"HM_f_GetElementXY('hm_m_dc_part_placer','y')+\";sTopMenuY+=\"(HM_f_GetElementXY('horizontal_ruler','y')-\";sTopMenuY+=\"(HM_f_GetElementXY('hm_m_dc_part_placer','y')+HM_f_GetMenuDimension(HM_TopLevelMenuId, false)))\";HM_f_SetMenus({TopMenuX:\"HM_window_right_edge-HM_f_GetMenuDimension(HM_TopLevelMenuId,true)-10\",TopMenuY:sTopMenuY,TopKeepInWindowX:0,TopKeepInWindowY:0,IsPermanent:1,IsHorizontal:1,PositionChild:\"below\",MilliSecondsVisible:0,CreateOnLoad:true,MenuID:HM_TopLevelMenuId});eval(\"HM_f_SetItems(\"+sHM_f_SetItems+\");\");HM_f_SetMenuTemplate({SeparatorColor:\"white\",BorderColor:\"#000000\", BGColorOver:\"#FF9900\",BGColor:\"#DB5500\",BorderWidth:1,FontColor:((cssStyleObj!=null)?cssStyleObj.color:\"#ffffff\"),FontColorOver:((cssStyleObj!=null)?cssStyleObj.color:\"#ffffff\"),FontColorSelected:((cssStyleObj!=null)?cssStyleObj.color:\"#ffffff\"),MoreImagesVisible:true,ImageSrc:HM_imgsrc+\"/HM_More_white_right.gif\",HM_OnVisibilityToggle:HM_fc_HideControls});sHM_f_SetItems=\"\";sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Balances\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Balances.asp?f=byfund-true&f=byaccount-true&f=webchart-true\",true,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Account Summary\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Account_Summary.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Beneficiaries\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Beneficiary.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Contributions With Growth\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Cost_Basis.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Instant Statement\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Instant_Statement.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Loans\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Loan_Inquiry.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Pending Requests\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Pending_Request.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Plan Information and Forms\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Request_Documents.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Roth Conversion/Rollover\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_IPRC_Security.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AccountMenu\",\"Statement\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Individual_Statements.asp\",false,\"\");if(sHM_f_SetItems!=\"\"){HM_f_SetMenus({MenuID:\"hmExbDCPart_AccountMenu\"});eval(\"HM_f_SetItems(\"+ sHM_f_SetItems+\");\");}sHM_f_SetItems=\"\";sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AnnualDecisions\",\"Asset Allocation\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Rebalance_Elections_View.asp\",true,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AnnualDecisions\",\"Exchange Rates\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Exchange_Rate_Inquiry.asp\",false,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_AnnualDecisions\",\"Historical Performance\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Historical_Investment_Performance.asp\",false,\"\");if(sHM_f_SetItems!=\"\"){HM_f_SetMenus({MenuID:\"hmExbDCPart_AnnualDecisions\"});eval(\"HM_f_SetItems(\"+ sHM_f_SetItems+\");\");}sHM_f_SetItems=\"\";sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_Administration\",\"Personal Profile\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Personal_Profile.asp\",true,\"\");sHM_f_SetItems+=GetMenuItemString(\"hmExbDCPart_Administration\",\"Password Changes\",\"\",\"65\",\"24\",\"\",\"\",\"EXB_RSQ_Pin_Change.asp\",false,\"\");if(sHM_f_SetItems!=\"\"){HM_f_SetMenus({MenuID:\"hmExbDCPart_Administration\"});eval(\"HM_f_SetItems(\"+ sHM_f_SetItems+\");\");}}";if(window.event + "" == "undefined") event = null;function HM_f_PopUp(){return false};function HM_f_PopDown(){return false};HM_ConfigFiles="HM_Config_Menu.js";</SCRIPT>
<!--EXB_DC_Infobar.asp-->
<TABLE id=Table1 border=0 cellSpacing=0 cellPadding=0 width="100%"><!--begin infobar table-->
<TBODY>
<TR>
<TD bgColor=#db5500 width="100%"><IMG id=hm_m_dc_part_placer alt="" src="../../../System/EXB/EXB_Images/t.gif" width=1 height=21> </TD></TR>
<TR>
<TD colSpan=14><IMG id=horizontal_ruler src="../../../System/EXB/EXB_Images/horizontal_rule.gif" width="100%" height=3></TD></TR></TBODY></TABLE><!-- end of infobar -->
<SCRIPT language=JavaScript1.2 type=text/javascript src="../../../System/EXB/EXB_Includes/Menu/HM_Loader.js"></SCRIPT>
<SCRIPT type=text/javascript src="../../../../System/EXB/EXB_Includes/Menu/HM_ScriptDOM.js">
</SCRIPT>
<SCRIPT type=text/javascript src="../../../../System/EXB/EXB_Includes/Menu/HM_Config_Menu.js">
</SCRIPT>
</TD></TR>
<TR>
<TD height="100%" vAlign=top width="100%">
<TABLE id=PageStart_5 border=0 cellSpacing=0 cellPadding=0 height="100%" valign="top">
<TBODY>
<TR>
<TD height="100%" vAlign=top>
<TABLE id=PageStart_6 border=0 cellSpacing=0 cellPadding=0 width="100%" height="100%" valign="top">
<TBODY>
<TR>
<TD class=Body_Title9pt height="100%" vAlign=top><!-- begin exb_global.asp --><!-- end exb_global.asp -->
<SCRIPT language=javaScript type=text/javascript>
<!-- Begin
var contentEcomp = "";
var contentInfoLinx = "";
function winOpen(url)
{
if (url.substr(11, 5) == "ecomp")
{
contentEcomp = window.open(url,"contentEcomp","resizable=yes,toolbar=yes,location=yes,width=800," +
"height=500,directories=no,status=no,scroll=yes,scrollbars=yes,menubar=yes,left=200,top=100");
contentEcomp.focus();
}
if (url.substr(7, 5) == "infol")
alert('To log in, use the following (case sensitive) credentials - Username: Consulting2005, Password: clientinfolinx') ;
{
contentInfoLinx = window.open(url,"contentInfoLinx","resizable=yes,toolbar=yes,location=yes,width=800," +
"height=500,directories=no,status=no,scroll=yes,scrollbars=yes,menubar=yes,left=200,top=100");
contentInfoLinx.focus();
}
}
//-->
</SCRIPT>
<TABLE border=0 cellSpacing=0 cellPadding=3 width="100%" height="100%" valign="top">
<TBODY>
<TR>
<TD> </TD>
<TD rowSpan=20><IMG src="../../../system/exb/exb_images/vert_black_bar.gif" width=1 height="100%"> </TD></TR>
<TR>
<TD class=Body_Title8pt><B>Welcome</B><BR></TD></TR>
<TR>
<TD class=Body_Value9pt>Rahul Raina<BR><BR></TD></TR>
<TR>
<TD class=Body_Title8pt><B>Plan Sponsor:</B><BR></TD></TR>
<TR>
<TD class=Body_Value8pt>McKinsey & Company<BR></TD></TR>
<TR>
<TD class=Body_Title8pt><B>Plan Name:</B><BR></TD></TR>
<TR>
<TD class=Body_Value8pt>Retirement Program (Profit-Sharing Retirement Plan (PSRP) and Money Purchase Pension Plan (MPPP), where applicable)<BR><BR></TD></TR>
<TR>
<TD height="100%"></TD></TR></TBODY></TABLE><IMG border=0 src="images/clear_px.gif" width=160 height=1> </TD></TR></TBODY></TABLE></TD>
<TD class=Body_Title9pt height="100%"> </TD>
<TD height="100%" vAlign=top width="100%"><!-- begin exb_global.asp --><!-- end exb_global.asp -->
<FORM id=frmHome method=post name=frmHome><INPUT id=postAction type=hidden name=postAction> <BR>
<TABLE id=Table1 border=0 cellSpacing=0 cellPadding=0 width="100%" valign="top">
<TBODY>
<TR>
<TD class=Body_Value16pt>Home</TD></TR>
<TR>
<TD class=Body_Value9pt> </TD></TR><!-- 0011 S, 0013, 0014 --><!--<tr>
<td class="Body_Value9pt">Submit your annual Asset Allocation form between September 15 and October 6, 2008. </td>
</tr>
<tr>
<td class="Body_Value9pt"> </td>
</tr> --><!-- 0011 E --><!-- 0009 S --><!-- <tr>
<td class="Body_Value10pt">
<a href="EXB_RSQ_Rebalance_Elections_View.asp">
<font color="#db5500"><b>Click here to complete your Asset Allocation form</b></font></a>
</td>
</tr> --><!-- 0009 E--></TBODY></TABLE><BR><INPUT id=sMassAnouncementXML value='<?xml version="1.0"?><anouncement_text><rows>0</rows></anouncement_text>' type=hidden name=sMassAnouncementXML> <INPUT id=isMessageViewed value=True type=hidden name=isMessageViewed> <INPUT id=sSubGroup value=D218354ECFF824224F45F173EC46FFED type=hidden name=sSubGroup>
<TABLE id=Table3 border=1 rules=none cellSpacing=0 cellPadding=0 width="80%">
<TBODY>
<TR class=Table_Header>
<TD width=5></TD>
<TD><B>Special Message from McKinsey & Company</B></TD>
<TD width=10></TD></TR>
<TR>
<TD height=8 colSpan=3></TD></TR>
<TR class=Body_Value8pt>
<TD width=5></TD>
<TD><B>Do we have your current e-mail address?</B><BR>To confirm or update your e-mail address, go to Administration Menu>Personal Profile.
<P></P><B>The 2013 Annual Decisions Period is over.</B><BR>Your next opportunity to change your allocation will be in the fall of 2014.
<P></P></TD><!-- 0026: removed <b> tags -->
<TD width=10></TD></TR>
<TR>
<TD height=8 colSpan=3></TD></TR>
<TR class=Table_Header>
<TD width=5></TD>
<TD><B>Participant Information</B></TD>
<TD width=10></TD></TR>
<TR>
<TD height=8 colSpan=3></TD></TR>
<TR class=Body_Value8pt>
<TD></TD>
<TD>Rahul Raina</TD>
<TD></TD></TR>
<TR class=Body_Value8pt>
<TD></TD>
<TD>Bangalore</TD>
<TD></TD></TR>
<TR class=Body_Value8pt>
<TD></TD>
<TD>Karanataka,<SPACE> <SPACE><SPACE>560001</TD>
<TD></TD></TR>
<TR class=Body_Value8pt height=20 vAlign=bottom>
<TD></TD>
<TD>Email Address: <B>mail@raina7.com</B> </TD>
<TD></TD></TR>
<TR class=Body_Value8pt height=20 vAlign=bottom>
<TD></TD>
<TD>Plan Status: Term & Awaiting Payment</TD>
<TD></TD></TR>
<TR height=5></TR>
<TR>
<TD height=8 colSpan=3></TD></TR>
<TR class=Table_Header>
<TD width=5></TD>
<TD><B>Balance Information</B></TD>
<TD width=10></TD></TR>
<TR>
<TD height=8 colSpan=3></TD></TR>
<TR class=Body_Value8pt>
<TD></TD>
<TD height=20 vAlign=top>Account balances are current as of October 31, 2013.</TD>
<TD></TD>
<TR>
<TR class=Body_Value8pt>
<TD></TD>
<TD>Value $98,390.82</TD>
<TD></TD></TR>
<TR height=5></TR>
<TR>
<TD height=8 colSpan=3></TD></TR></TBODY></TABLE><BR><BR>
<P><A href="EXB_RSQ_Instant_Statement.asp"><FONT size=2 face="verdana, helvetica, arial"><B>Click here for an Instant Web Statement</B></FONT></A></P><BR></FORM>
<SCRIPT language=Javascript>
//0023
function fn_getReport(siteURL)
{
document.frmHome.postAction.value = "report";
document.frmHome.submit();
}
function winOpen(siteURL)
{
window.open(siteURL, "","resizable=yes,toolbar=no,location=no,width=640," +
"height=480,directories=no,status=no,scroll=yes,scrollbars=yes,menubar=no,left=100,top=20");
}
//0005 -S
function OpenAnouncement(PlanID,GroupID,PartID)
{
var url = "../../../System/Exb/Exb_Includes/RSQ_Mass_Anouncement.asp?read=" +
document.getElementById("isMessageViewed").value +
"&groupid=" + GroupID +
"&subgroupid=" + document.getElementById("sSubGroup").value ;
if(document.getElementById("imgNew") != null)
{
document.getElementById("imgNew").style.display = "none";
}
var popupwindow = "";
popupwindow = window.open(url,"Mass_Announcement","resizable=yes,toolbar=no,location=no,width=500," +
"height=500,directories=no,status=no,scrollbars=yes,menubar=no,left=200,top=100");
popupwindow.focus();
}
//0005 -E
</SCRIPT>
</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD align=middle>
<TABLE border=0 cellSpacing=0 cellPadding=0 width="100%">
<TBODY>
<TR>
<TD class=StatusBar2 height=20 width="50%"><A href="javascript:winOpenCopyright_RSQ();">Copyright 2003 Aon Consulting</A></TD>
<TD class=StatusBar2 height=20 width="50%" align=right><A href="javascript:winOpenPrivacy_RSQ();">Security and Privacy Statement</A></TD></TR>
<TR>
<TD class=StatusBar1 height=20 colSpan=2 align=middle><A href="EXB_RSQ_Contact_Us.asp">Contact Us</A> | <A href="javascript:print();">Print Screen</A> | <A href="javascript:User_Log_Off();">Log Off</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--
Start: 12/8/2013 10:46:06 AM
End : 12/8/2013 10:46:07 AM
Host : 192.168.11.106
-->
<DIV style="Z-INDEX: 5000; BORDER-BOTTOM: transparent 0px solid; POSITION: absolute; BORDER-LEFT: transparent 0px solid; WIDTH: 686px; HEIGHT: 22px; VISIBILITY: visible; OVERFLOW: hidden; BORDER-TOP: transparent 0px solid; TOP: 66px; CURSOR: default; BORDER-RIGHT: transparent 0px solid; LEFT: 292px" id=hmExbDCPart title="" sp="null">
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 47px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 0px" id=hmExbDCPart_I1 title="" hh="46">Home</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 83px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 47px" id=hmExbDCPart_I2 title="" hh="82">Select Plan</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 100px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 130px" id=hmExbDCPart_I3 title="" hh="99">Account Menu</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 93px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 230px" id=hmExbDCPart_I4 title="" hh="92">Withdrawals</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 121px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 323px" id=hmExbDCPart_I5 title="" hh="120">Annual Decisions</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 105px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 444px" id=hmExbDCPart_I6 title="" hh="104">Administration</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 80px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; BORDER-RIGHT: #666666 1px solid; PADDING-TOP: 4px; LEFT: 549px" id=hmExbDCPart_I7 title="" hh="79">Contact Us</DIV>
<DIV style="POSITION: absolute; PADDING-BOTTOM: 4px; BACKGROUND-COLOR: #db5500; FONT-STYLE: normal; PADDING-LEFT: 4px; WIDTH: 57px; PADDING-RIGHT: 4px; FONT-FAMILY: Verdana, Verdana, Tahoma; HEIGHT: 22px; VISIBILITY: inherit; FONT-SIZE: 9pt; OVERFLOW: hidden; TOP: 0px; CURSOR: hand; FONT-WEIGHT: bold; PADDING-TOP: 4px; LEFT: 629px" id=hmExbDCPart_I8 title="" hh="57">Log Off</DIV></DIV></BODY>'
请忽略复杂的html页面代码。我只想说,当我在记事本中复制它并将其保存为.html页面时,它会正确呈现页面。
但是当我尝试使用iframe在iframe中显示它时,它不会显示任何内容:
var textBody = $(printstr);
var iframeBody = $('#test').contents().find('body');
iframeBody.append(textBody.html());
此处printstr
是包含html字符串的字符串。任何帮助将不胜感激。
答案 0 :(得分:3)
存储要从JavaScript使用的大量页面内容的好方法(至少在“好”中,“比作为一个巨大的JavaScript字符串常量要好得多”)是使用{{ 1}}具有不可执行“类型”属性的元素:
<script>
然后,您可以通过访问DOM元素的<script id=frameContent type=text/content>
<BODY class=whatever>
<!-- ... -->
</BODY>
</script>
属性来获取脚本的内容。 (这就是为什么这个例子给元素一个“id”值 - 这使得它很容易找到。)
现在,在您的情况下,这种方法会遇到问题,因为您尝试在框架内容中包含所有这些.innerHTML
元素。这可以通过使用一些替代标记而不是<script>
结束标记来解决:
</script>
然后当您获取内容时,您将“@ script”替换为“/ script”:
<script id=frameContent type=text/content>
<BODY class=whatever>
<!-- ... -->
<script src=some/script.js><@script>
</BODY>
</script>
一种完全不同的方法是放弃包含这样的帧内容的想法,只需在服务器上托管该页面并让浏览器单独获取它。以增加的HTTP事务为代价,它不会那么混乱。