在IE中使用object标签 [英] Using the object tag in IE

查看:182
本文介绍了在IE中使用object标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

>从我使用的书作为参考我明白applet标签

已被弃用,但谷歌搜索信息,并测试自己,它

似乎IE使用此新对象标记无法正常工作。所以我的努力​​

阅读关于对象标签的是什么?我有没有办法为IE和Mozilla做这个工作?


< HTML>

< HEAD>

< / HEAD>

< BODY BGCOLOR =" FFFFFF">

< CENTER>

< object classid =" java:AwtCalcApplet.class"

archive =" AwtCalc.jar"

type =" application / x-java-applet" ;

codebase ="。"

width =" 220"

height =" 150" >

我没有任何对象,这就是我显示此文本的原因

< / object>

< / CENTER>

< / BODY>

< / HTML>

解决方案

经过一番调查后,我做了这个,我想这样可行。


< br />

< br />

< br />

< form action =" scan" method =" POST">

< center>

< div Id =''appie''>< / div>

< / form>


< script>

var target = document.getElementById(''appie'');

// alert(target);

var InternetExplorer = navigator.appName.indexOf(" Microsoft")!= -1;

// alert( InternetExplorer);

if(InternetExplorer!= true)

{

// alert(''mozilla'');

target.innerHTML ="< object classid =''java:AwtCalcApplet.class''

archive =''/ AwtCalc.jar''type =''application / x- java-applet''codebase =''/''

width =''220''height ='''150''>我没有任何对象,这就是为什么我

显示此文字< / object>" ;;

}

else

{

// alert(''internet explorer'');

target.innerHTML ="< applet code =''AwtCalcApplet.class ''存档

=''/ AwtCalc.jar''width =''220''height ='''150''> < / applet>" ;;

};

< / script>


在2005年12月9日10:12,marc写道:

从我使用的书作为参考我理解applet标签
已被弃用,


正确。它已经很长时间了。

但谷歌搜索信息,并测试自己,似乎IE确实无法正常使用这个新的对象标签。


确实如此,但不像其他浏览器那么容易。

所以我读取对象标签的努力是什么?


完全没有。

我无法为IE和Mozilla做这项工作吗?


是的。参见

< http://groups.google.co.uk/group/alt.html/browse_frm/thread/1a71a3fd69503de8/d4b02174e1cf3f16#d4b02174e1cf3f16>


[snip]

< BODY BGCOLOR =" FFFFFF">
< CENTER>




bgcolor属性和CENTRE元素也已弃用。使用CSS,

代替。


[snip]


Mike


-

Michael Winter

在通过电子邮件回复之前使用[新闻]作为前缀主题。


marc写道:

经过一番调查后我做了这个,我想这样可行。

< br />
< br />
< br />
< form action =" scan" method =" POST">
< center>
< div Id =''appie''>< / div>
< / form>


< shudder />我猜不会。 < URL:http://validator.w3.org/>

[无意义的无效代码剪断]



PointedEars


>From the book I am using as a reference I understood that applet tag
was deprecated, but googling for information, and testing myself, it
seems IE does not work properly with this new object tag. So my effort
reading about the object tag was for nothing? Is there no way I can
make this work for IE and Mozilla?

<HTML>
<HEAD>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<CENTER>
<object classid="java:AwtCalcApplet.class"
archive="AwtCalc.jar"
type="application/x-java-applet"
codebase="."
width = "220"
height = "150" >
I do not have any object that is why I display this text
</object>
</CENTER>
</BODY>
</HTML>

解决方案

After some investigation I made this, I guess this works ok.

<br/>
<br/>
<br/>
<form action="scan" method="POST">
<center>
<div Id=''appie''></div>
</form>

<script>
var target = document.getElementById(''appie'');
// alert(target);
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// alert(InternetExplorer);
if (InternetExplorer != true)
{
// alert(''mozilla'');
target.innerHTML = "<object classid=''java:AwtCalcApplet.class''
archive=''/AwtCalc.jar'' type=''application/x-java-applet'' codebase=''/''
width=''220'' height=''150''> I do not have any object that is why I
display this text </object>";
}
else
{
// alert(''internet explorer'');
target.innerHTML = "<applet code = ''AwtCalcApplet.class'' archive
= ''/AwtCalc.jar'' width = ''220'' height = ''150''> </applet>";
};
</script>


On 09/12/2005 10:12, marc wrote:

From the book I am using as a reference I understood that applet tag
was deprecated,
Correct. It has been for a long time.
but googling for information, and testing myself, it seems IE does
not work properly with this new object tag.
It does, but not so readily as other browsers.
So my effort reading about the object tag was for nothing?
Not at all.
Is there no way I can make this work for IE and Mozilla?
Yes. See
<http://groups.google.co.uk/group/alt.html/browse_frm/thread/1a71a3fd69503de8/d4b02174e1cf3f16#d4b02174e1cf3f16>

[snip]
<BODY BGCOLOR="FFFFFF">
<CENTER>



The bgcolor attribute and CENTER element are also deprecated. Use CSS,
instead.

[snip]

Mike

--
Michael Winter
Prefix subject with [News] before replying by e-mail.


marc wrote:

After some investigation I made this, I guess this works ok.

<br/>
<br/>
<br/>
<form action="scan" method="POST">
<center>
<div Id=''appie''></div>
</form>
<shudder/> I guess not. <URL:http://validator.w3.org/>
[nonsensical invalid code snipped]


PointedEars


这篇关于在IE中使用object标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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