【问题标题】:Is there any way to render a complete webpage as a component in react application?有没有办法将完整的网页呈现为 React 应用程序中的组件?
【发布时间】:2019-09-22 18:59:44
【问题描述】:

点击一个按钮说 href 到“youtube.com”,我们可以使用 react-route 渲染这个完整的重定向页面在组件内吗?

【问题讨论】:

    标签: reactjs react-router


    【解决方案1】:

    在您的应用程序中创建一个组件来加载此网页。在代码下方的那个组件中。

    <iframe src="placeyourdestinationpath"} id="iframe-style"> </iframe> 
    

    你可以通过这个来实现你的目标。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-11-08
      • 1970-01-01
      • 2018-02-19
      • 2015-01-03
      • 1970-01-01
      • 2020-09-10
      • 2016-06-11
      相关资源
      最近更新 更多