我有一个已经存在的asp页面,我想添加一个IFrame。问题是无论我在Body中添加框架,都不再显示该点之后的所有内容。如果我拿一张已经存在的表并再次复制它,我会在屏幕上看到该表两次,但是如果我获取第二个表的内容并用IFrame替换它们,那么我在页面下面的其他所有内容都会出现无形。有人知道可能导致这种行为的原因吗?
</HEAD>
<body style="font-size:12">
<form>
<table width=50% align=center >
<tr><td align=center >
<font style="font-size:12px;BackGround-Color:yellow"> Your test results were successfully
mailed to <%=Request("MailTo") %></font>
</td></tr></table>
<%End IF %>
<br />
<table align=center><tr><td colspan="10"><input id="Button3" onclick="return ConfirmExit(<%=intTestRecordID%>)"
value="Go to Locker" type="button" name="btnButton">
<input id="Button4" onclick="javascript:window.print()" value="Print Summary Report" type="button"
name="btnPrint"> <input id="btnGoToEmail" onclick="javascript:document.location='#EmailReport'"
value="Email Report" type="button" name="btnButton"></td> </tr><br />
</table>
<br />
<%=BuildReport(objTest,false) %>
<br />
<table align=center><tr><td colspan="10"><input id="Button1" onclick="return ConfirmExit(<%=tstID%>)"
value="Go to Locker" type="button" name="btnButton"> <input id="Button2" onclick="javascript:window.print()" value="Print Summary Report" type="button"
name="btnPrint"></td></tr></table>
</form>
<br />
<a name="EmailReport"></a>
<form method="POST" name="emailtestresults" action='?emailedresults=1&TestRecordID=<%=Request.querystring("TestRecordID")%>'>
<table style='BORDER-BOTTOM:lightgrey thin solid; BORDER-LEFT:lightgrey thin solid; font-size:12px; MARGIN:0px; BORDER-TOP:lightgrey thin solid; BORDER-RIGHT:lightgrey thin solid' cellpadding='2' cellspacing='4' width='55%' align='center'>
<tr><td >
<B><%=ReplaceResourceDefault(GetResourceText("ScoreReportASP_msgCustomEmailResults1"),muREPLACE_TEST_TEXT)%></B>
</td></tr>
<!--ANP WR1309
Send a copy of your <%'=lcase(muREPLACE_TEST_TEXT)%> results to yourself, your boss, your spouse, or anyone you
want to impress...<p>
To email your <%'=lcase(muREPLACE_TEST_TEXT)%> results, enter the email address
and a brief message you want attached to the top of your <%'=lcase(muREPLACE_TEST_TEXT)%> results and click the OK button.
-->
<tr><td>
<%=ReplaceResourceCustom(GetResourceText("ScoreReportASP_msgCustomEmailResults2"),"%%ZZ%%",lcase(muREPLACE_TEST_TEXT))%>
</td></tr>
<tr><td>
<b>Send Results to:</b><input type="text" size="30" name="mailto" value="<%=Session("EmailAddress")%>">
</td></tr>
<!-- ANP WR1309
<strong>Message to Include with <%'=muREPLACE_TEST_TEXT%> Results:</strong><br>
-->
<tr><td>
<B><% Response.write ReplaceResourceDefault(GetResourceText("ScoreReportASP_msgCustomEmailResults4"),muREPLACE_TEST_TEXT) %>
</B><br />
<textarea rows="8" name="Message" cols="55"></textarea>
</td></tr>
<tr><td>
<%'ANP WR1309
'DisplayComplexFormBtn "javascript:document.emailtestresults.submit();", "Email your " & lcase(muREPLACE_TEST_TEXT) & " results", "Email your " & lcase(muREPLACE_TEST_TEXT) & " results", 0, 0, "", "Email Results"
DisplayComplexFormBtn "javascript:document.emailtestresults.submit();", ReplaceResourceCustom(GetResourceText("ScoreReportASP_msgCustomEmailResults5"),"%%ZZ%%",lcase(muREPLACE_TEST_TEXT)), ReplaceResourceCustom(GetResourceText("ScoreReportASP_msgCustomEmailResults5"),"%%ZZ%%",lcase(muREPLACE_TEST_TEXT)), 0, 0, "", GetResourceText("ScoreReportASP_msgCustomEmailResults6")
%>
</td></tr>
</table>
</form>
</body>
</HTML>
<script language="javascript">
function ConfirmExit(TestRecordId) {
var blnOK = confirm("Please make sure you have printed or emailed your results before returning to the Learning Locker. Once you have left this page you will not be able to return.");
if (blnOK == true) {
window.location.href = "/lockerweb/mylocker.aspx?cptrid=" + TestRecordId;
return true;
}
}
</script>
如果我添加此iFrame
<iframe src="http://www.amazon.com" frameborder="No" width="100%" height="200" id="iFrame" vspace="10">
页面上的任何位置,然后iframe下方的其余页面将消失。如果我检查源代码,那么所有代码都在那里,只是不可见。
答案 0 :(得分:2)
您需要关闭您的Iframe代码:
<iframe src="http://www.amazon.com" frameborder="No" width="100%" height="200" id="iFrame" vspace="10"></iframe>