我们的客户端有一堆用Server编写的报告,我们需要在MVC应用程序中显示它们。
但是,我们知道HTML5不再支持iFrames的使用,因此我们需要找到另一种方法。
我试过以下几种方法,但没有成功。
<div id="rptViewer" style="width: 800px; height: 800px;"></div>
$(function () {
$("#rptViewer").load("URL/ReportViewer.aspx?/NewDailyReport/DailyReport&date=2012-05-30&rs:Format=HTML4.0", function (response, status, xhr) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
alert(msg + xhr.status + " " + xhr.statusText);
}
});
});编辑
也不起作用;
$.get("URL/ReportViewer.aspx?/NewDailyReport/DailyReport&date=2012-05-30&rs:Format=HTML4.0", function (response) {
alert(8);
$('#rptViewer').html(response);
});发布于 2012-07-10 02:29:18
HTML 5确实支持iframes。添加了一些有趣的属性,如"sandbox“和"srcdoc”。
iframe.asp
https://stackoverflow.com/questions/11405465
复制相似问题