小编JsR*_*ico的帖子

以编程方式创建IFrame并返回其location.search

我需要一个带有URL的函数,并将该URL的iframe附加到iframe的父文档主体.然后该函数应返回该iframe的window.location.search,而不知道该函数的URL参数.

我怎样才能在JavaScript中执行此操作?

编辑:如果第一句对你没有意义,试试这个:我需要一个函数,将一个iframe附加到文档正文,给定一个URL作为参数.换一种说法:

function appendIFrame(url) {
    // create iframe whose address is `url`
    // append iframe to body of document
    // return location.search of iframe's `window`, without using `url` argument
}
Run Code Online (Sandbox Code Playgroud)

javascript iframe

4
推荐指数
1
解决办法
6131
查看次数

标签 统计

iframe ×1

javascript ×1