Skip to content

[html] 第85天 iframe的使用场景有哪些? #592

Open
@haizhilin2013

Description

@haizhilin2013
Collaborator

第85天 iframe的使用场景有哪些?

Activity

fuhao97

fuhao97 commented on Jul 10, 2019

@fuhao97

1:典型系统结构,左侧是功能树,右侧就是一些常见的table或者表单之类的。为了每一个功能,单独分离出来,采用iframe。 
2:ajax上传文件。 
3:加载别的网站内容,例如google广告,网站流量分析。
4: 在上传图片时,不用flash实现无刷新。
5: 跨域访问的时候可以用到iframe,使用iframe请求不同域名下的资源。

nowherebutup

nowherebutup commented on Jul 10, 2019

@nowherebutup

1.公共的头部或底部,用iframe嵌入
2.网站的小广告使用iframe嵌入
3.一个系统想用另外一个系统的某个独立功能

pokerLife

pokerLife commented on Jul 10, 2019

@pokerLife

不喜欢iframe,iframe布局都是给懒人准备的,而且使用iframe不利于seo

dondonZh

dondonZh commented on Jul 10, 2019

@dondonZh

1.图表嵌入
2.广告
3.跨域访问

JiangXue93

JiangXue93 commented on Jul 10, 2019

@JiangXue93

跨域方面扩展下:
1、接入h5游戏
2、接入支付
3、视频,官网背景视频
4、用户三方登录

zlx362211854

zlx362211854 commented on Jul 10, 2019

@zlx362211854

下载文件,使用window.open打开选项卡的话,页面会有闪动,用iframe来下载文件,可避免上面的问题

forever-z-133

forever-z-133 commented on Jul 10, 2019

@forever-z-133

隔离 dom,比如单独打印某个小页面,又不想受父窗口的样式影响,则可以新建个 iframe 来打印。

smile-2008

smile-2008 commented on Feb 25, 2021

@smile-2008

1:典型系统结构,左侧是功能树,右侧就是一些常见的table或者表单之类的。为了每一个功能,单独分离出来,采用iframe。 
2:ajax上传文件。 
3:加载别的网站内容,例如google广告,网站流量分析。
4: 在上传图片时,不用flash实现无刷新。
5: 跨域访问的时候可以用到iframe,使用iframe请求不同域名下的资源。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @smile-2008@haizhilin2013@JiangXue93@forever-z-133@zlx362211854

        Issue actions

          [html] 第85天 iframe的使用场景有哪些? · Issue #592 · haizlin/fe-interview