【问题标题】:Browse Another Website Inside MVC Application在 MVC 应用程序中浏览另一个网站
【发布时间】:2016-10-16 04:54:50
【问题描述】:

我有一个现有的 Web 应用程序,我想在我的新应用程序中显示它,以便完整的应用程序在新应用程序中运行。

在图片中我附加了 google.com,所以搜索某些内容应该显示结果,甚至打开网站。

我不确定如何实现。

我发现的一种方法是 IFrame,所以我想知道其他可能性是因为我确实想使用 IFrame

为示例附加图像

提前致谢。

【问题讨论】:

    标签: asp.net-mvc iframe cross-domain


    【解决方案1】:

    也许您可以使用诸如花式工具箱之类的工具。 http://fancyapps.com/fancybox/#examples 但通常这些工具也使用 iframe。也许你可以为fancybox找到另一种方式。

    编辑:Embed an External Page Without an Iframe?

    编辑 2:你试过这个吗? http://www.felgall.com/noiframe.htm

    <html>
    <head>
        <title>example</title>
    </head>
    <body>
        Ilker Test
        <br />
        <!--[if lte IE 6]>
            <object classid="CLSID:25336920-03F9-11CF-8FD0-00AA00686F13"
            data="http://www.w3schools.com/html/html_examples.asp" style="height:800px; width:1200px; overflow:hidden;">
            </object>
            <![endif]-->
        <!--[if gte IE 7]><!-->
        <object type="text/html" data="http://www.w3schools.com/html/html_examples.asp"
                style="height:800px; width:1200px;">
            <p>Alternate text.</p>
        </object>
        <!--><![endif]-->
        </object>
    </body>
    

    【讨论】:

    • 也尝试了链接,但随后出现了一些 java 脚本冲突
    • 您可以尝试从目标网站下载html代码并用html.raw显示
    • 我想要的是完整的网站应该在我的应用程序中运行,而不仅仅是显示 1 页
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多