在IE中使用document.createElement('iframe')的故事是什么? [英] Whta's the Story with document.createElement('iframe') in IE?

查看:209
本文介绍了在IE中使用document.createElement('iframe')的故事是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现某些来源推荐使用

document.createElement(''< iframe src ="#">>在IE中创建IFrame

;'')

而不是document.createElement(''iframe'')。

为什么以及使用什么浏览器版本? IE5或IE6?

谢谢

解决方案

9月9日下午3:37,vunet写道:


我发现在IE浏览器中使用

document.createElement(''< iframe src ="#">'')

而不是document.createElement(''iframe'')。

为什么


浏览器问题分析的总体质量非常差,并且可能会建议将事情作为解决问题的方法,因为这些问题从未被固定下来或者由提出这些建议的人理解。


以及使用它的浏览器版本? IE5还是IE6?



没有理由使用它,至少(当然)来自IE 6的b $ b。



>

至少没有理由使用它(当然来自IE 6的



这不是我所见过的。事实上,有一种情况我向远程IFRAME提交表格

。在我使用上面的语法修复它之前,IE6从未对IE6起作用,因为使用IE6与IFRAME进行通信是不可能的。

但你是说这个解决办法可能没有修复我

解释?此外,这里是另一个链接,其中iframe创建如下:

document.createElement(''< iframe src ="#">'')

http://developer.apple.com/internet/...nt /iframe.html


谢谢


vunet写道:


[Henry写道:]


>根本没有理由使用它,至少(当然)
来自IE 6.



这不是我所见过的。事实上,有一种情况我向远程IFRAME提交表格

。在我使用上面的语法修复它之前,IE6从未对IE6起作用,因为使用IE6与IFRAME进行通信是不可能的。

但你是说这个解决办法可能没有修复我

解释?



基于MSHTML 5.0及更高版本的用户代理支持W3C DOM的这种方法

指定的1级以上。根本没有必要的解决方法。


此外,这是另一个iframe创建的链接:

document.createElement(' '< iframe src ="#">'')
http://developer.apple.com/internet/...nt/iframe.html



所以我们应该吃sh *因为一百万只苍蝇 - 特别是那些大的,

嘈杂的 - 不能错?


请修剪,但不要删除,GG'默认属性行。

PointedEars

-

var bugRiddenCrashPronePieceOfJunk =(

navigator.userAgent.indexOf (''MSIE 5'')!= -1

&& navigator.userAgent.indexOf(''Mac'')!= -1

)/ / Plone,register_function.js:16


It is recommended by some sources I found to create IFrames in IE
using
document.createElement(''<iframe src="#">'')
instead of document.createElement(''iframe'').
Why and what browser versions to use it? IE5 or IE6?
Thanks

解决方案

On Sep 9, 3:37 pm, vunet wrote:

It is recommended by some sources I found to create
IFrames in IE using
document.createElement(''<iframe src="#">'')
instead of document.createElement(''iframe'').
Why

The generally quality of browser issue analysis is extremely poor and
may things get suggested as workarounds for issues that have never
been pinned down or understood by the people making those suggestions.

and what browser versions to use it? IE5 or IE6?

There is no reason to use it at all, at the very least (and certainly)
from IE 6.


>
There is no reason to use it at all, at the very least (and certainly)
from IE 6.

It''s not what I''ve seen around. In fact there was a case where I was
submitting form to remote IFRAME. That never worked for IE6 until I
used the syntax above to fix it, because the was no possible
communication with that IFRAME using IE6.
But are you saying that this workaround could be without the fix I
explain? Also, here is another link where iframe is created like so:
document.createElement(''<iframe src="#">'')

http://developer.apple.com/internet/...nt/iframe.html

Thanks


vunet wrote:

[Henry wrote:]

>There is no reason to use it at all, at the very least (and certainly)
from IE 6.


It''s not what I''ve seen around. In fact there was a case where I was
submitting form to remote IFRAME. That never worked for IE6 until I
used the syntax above to fix it, because the was no possible
communication with that IFRAME using IE6.
But are you saying that this workaround could be without the fix I
explain?

User agents based on MSHTML 5.0 and later support this method of W3C DOM
Level 1+ as it was specified. There is no workaround necessary at all.

Also, here is another link where iframe is created like so:
document.createElement(''<iframe src="#">'')

http://developer.apple.com/internet/...nt/iframe.html

So we should eat sh*t because a million flies -- and especially the big,
noisy ones -- cannot be wrong?

Please trim, but do not remove, GG''s default attribution line.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf(''MSIE 5'') != -1
&& navigator.userAgent.indexOf(''Mac'') != -1
) // Plone, register_function.js:16


这篇关于在IE中使用document.createElement('iframe')的故事是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆