对象检测< OBJECT>元件
这是为了修复一个长期存在的问题(咳嗽)Java(咳嗽)问题,我肯定你们中的一些人会熟悉这些问题。
Sun建议使用< OBJECT> /< EMBED>
元素来满足Java applet,但是后来
使用*浏览器* *嗅探* Javascript选择
他们之间。
我希望找到/创建一个脚本
将使用特征检测来编写
相应的标签,但是我很难过如何检测是否使用OBJECT
元素或或者(实际上)
原来的APPLET *元素。
*我想避免无效的HTML,
和< EMBED>事情从来都不是有效的
HTML元素,不在任何HTML推荐中
无论如何我都可以把手放在上面。
所以,我的直接问题是..
有没有办法检测浏览器是否理解
< OBJECT>元素,使用Javascript对象检测?
怎么样?
BTW ..我正在玩一些实验
''嵌套''各种元素,不使用
Javascript。他们相当不成功,
你可以在这里看到他们..
< http://www.physci.org/test/appletcall/>
...这个帖子几乎可以找到该页面的结论。
欣赏任何见解。
-
Andrew Thompson
http://www.PhySci.org/ 开源软件套件
http://www.PhySci.org/codes/ Web& IT帮助
http://www.1point1C.org/ Science&技术
This is intended to fix a long standing
(cough)Java(cough) problem with which I''m
sure some of you will be familiar.
Sun recommends using the <OBJECT>/<EMBED>
elements to cater for Java applets, but then
uses *browser* *sniffing* Javascript to select
between them.
I was hoping to find/create a script that
will use feature detection to write the
appropriate tag, but I am stumped as to
how to detect whether to use the OBJECT
element or alternatively (& in actuality)
the original APPLET* element.
* I want to avoid invalid HTML as well,
and the <EMBED> ..thing was never a valid
HTML element, not in any HTML recommendation
I can put my hands on, in any case.
So, my immediate questions are..
Is there a way to detect if a browser will understand
the <OBJECT> element, using Javascript object detection?
How?
BTW.. I was playing with some experiments
on ''nesting'' the various elements, using no
Javascript. They were rather unsuccessful,
you can see them here..
<http://www.physci.org/test/appletcall/>
...this post pretty much picks up where the
''conclusion'' of that page arrives.
Appreciate any insights.
--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
在文章< 15 *********************** *******@40tude.net>,
Se ******** @ www .inva 盖子启发我们...
In article <15******************************@40tude.net>,
Se********@www.invalid enlightened us with...
有没有办法检测浏览器是否理解
< OBJECT>元素,使用Javascript对象检测?
Is there a way to detect if a browser will understand
the <OBJECT> element, using Javascript object detection?
为什么会这样?
来自< http://www.ibiblio.org/javafaq/ course / week5 / 14.html>
[cite]
您可以通过放置< APPLET>来支持这两种情况。 < OBJECT>
元素中的元素如下:
< OBJECT classid =" MyApplet"宽度= QUOT; 200" height =" 200">
< APPLET code =" MyApplet"宽度= QUOT; 200" height =" 200">
< / APPLET>
< / OBJECT>
了解<的浏览器;对象>将忽略其内容,而
的浏览器不会显示其内容。
[/ cite]
-
-
~kaeli~
如果葬礼游行是在晚上,请大家开车带
他们的关灯?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace >
Why would you?
From <http://www.ibiblio.org/javafaq/course/week5/14.html>
[cite]
You can support both by placing an <APPLET> element inside an <OBJECT>
element like this:
<OBJECT classid="MyApplet" width="200" height="200">
<APPLET code="MyApplet" width="200" height="200">
</APPLET>
</OBJECT>
Browsers that understand <OBJECT> will ignore its content while browsers that
don''t will display its content.
[/cite]
--
--
~kaeli~
If the funeral procession is at night, do folks drive with
their lights off?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
文章< 15 ***************************** *@40tude.net>,
Se********@www.inva 盖子启发我们...
In article <15******************************@40tude.net>,
Se********@www.invalid enlightened us with...
有没有办法检测浏览器是否理解
< OBJECT>元素,使用Javascript对象检测?
Is there a way to detect if a browser will understand
the <OBJECT> element, using Javascript object detection?
哦,我想任何支持新DOM的浏览器都会支持对象标签。所以给它一个ID并测试
if(document.getElementById&& document.getElementById(" myObjectId"))
如果我错了,有人让我知道,mmkay?
-
-
~ kaeli~
如果葬礼队伍是在晚上,那么人们开着他们的灯关闭
吗?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
Oh, and I would imagine that any browser that supports the new DOM will
support the object tag. So give it an ID and test for
if (document.getElementById && document.getElementById("myObjectId"))
If I''m wrong on that, someone let me know, mmkay?
--
--
~kaeli~
If the funeral procession is at night, do folks drive with
their lights off?
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
周五, 2004年8月20日09:44:02 -0500,kaeli写道:
On Fri, 20 Aug 2004 09:44:02 -0500, kaeli wrote:
< OBJECT classid =" MyApplet"宽度= QUOT; 200" height =" 200">
< APPLET code =" MyApplet"宽度= QUOT; 200" height =" 200">
< / APPLET>
< / OBJECT>
<OBJECT classid="MyApplet" width="200" height="200">
<APPLET code="MyApplet" width="200" height="200">
</APPLET>
</OBJECT>
这基本上就是我在这里尝试的。 。
< http://www.physci.org/test/appletcall/index1.html>
我做错了吗? (IE 6提供两个电话。)
-
Andrew Thompson
http://www.PhySci.org/ 开源软件套件
http://www.PhySci.org/codes/ Web& IT帮助
http://www.1point1C.org/ Science&技术
That is essentially what I attempted here..
<http://www.physci.org/test/appletcall/index1.html>
Did I do it wrong? (IE 6 renders both calls.)
--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology