用firefox的bug [英] Bug with firefox

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

问题描述

我需要隐藏并显示som DIV部分,


网上有很多脚本。我下载了允许

我从DIV内部打开一个隐藏的DIV而不是隐藏它。这个

完成了我对我的工作很满意。


直到我看到Firefox中的混乱忽略了我所有的一切我b $ b告诉它做并打开所有DIV,无论负载如何。遗忘了浏览器的战争术语,为什么Firefox会发布一个程序,因为
不能使用常用代码我只需要这样做就可以了/>
适用于Firefox和MSIE以及其他任何内容。


函数InsertContentmed(tid){

if(

document.getElementById(tid).style.display ==" none"){

document.getElementById(tid).style.display ="" ;;

document.regfrms.cgfnm.focus();

}

else {

document.getElementById(tid).style.display =" none";

}

}


我通过点击通话打开和关闭隐藏的DIV。 (它打开它

关闭它并在它打开时关闭它,另一个标准

方式这对我不起作用,因为我需要这个使用另一个Javascript

函数打开的父DIV工作来自

.


任何和所有帮助非常感谢


Garry Jones

瑞典

I needed to hide and show som DIV sections,

There are many scripts on the net for this. I downloaded that allows
me to open a hidden DIV from inside a DIV than is itself hidden. This
accomplished I was pleased with my work.

That was until I saw the mess in Firefox which ignores everything I
tell it to do and opens all the DIVs regardless on load. Forgetting
the browser war jargon as to why Firefox would release a program that
doesn''t work with common code I just need a way of doing this so it
works in Firefox AND MSIE and anything else out there.

function InsertContentmed(tid) {
if (
document.getElementById(tid).style.display == "none") {
document.getElementById(tid).style.display = "";
document.regfrms.cgfnm.focus();
}
else {
document.getElementById(tid).style.display = "none";
}
}

I am opening and closing a hidden DIV with a click call. (It opens it
when it is closed and it closes it when it is open, The other standard
way of doing this does not work for me as I need this to work from
withing a parent DIV that is itself opened by another Javascript
function.

Any and all help greatly appreciated

Garry Jones
Sweden

推荐答案

解决了!


我在写这段代码之前遇到了麻烦,所以我把一对< DIVtags更改为< ptags了。这些都是错误的。


Firefox不允许< ptags有[style =" display:none"]

组件。奇怪但是真的,当转回DIV时它会工作<完美(即使在MSIE上)。我害怕在其他浏览器上看到我的网站但是

知道我必须......


抱歉打扰了你们好人......


然而,更广泛的问题和OT但是t不同的互联网浏览器

是一个令人头疼的问题,就像一个允许人们同时驾驶

离开并骑在路边的国家。我不在乎哪一个

但如果所有制作浏览器的公司都放弃了b / b
放弃并删除了他们的产品,那么生活会不会变得更糟糕?有什么意义?

一个?


干杯

Garry Jones

瑞典
Solved!

I was having trouble earlier when I wrote this code so I changed a
couple of <DIVtags to <ptags. It was these that were faulting.

Firefox does not allow <ptags to have a [ style="display: none" ]
component. Strange but true, when turned back to DIV it works
perfectly (even on MSIE). I dread to see my site on other browsers but
know I must......

Sorry to have disturbed you good people.....

However, a wider issue and OT but these differing Internet browsers
are a headache, rather like a country allowing people to drive on the
left and ride side of the road at the same time. I dont care which one
but wouldn''t life be jollier if all the companies making browsers bar
one gave up and deleted their products? What''s the point of more than
one?

Cheers
Garry Jones
Sweden


GarryJones写道:
GarryJones wrote:

解决了!
Solved!



似乎只是这样。你只是找到了解决这个问题的办法,因为分析不充分导致了这个问题。

It only seems so. You have merely found a workaround to the problem as
caused by the insufficient analysis of it.


我写的时候遇到麻烦这段代码所以我改变了一对

of< DIVtags to< ptags。正是这些是错误的。
I was having trouble earlier when I wrote this code so I changed a couple
of <DIVtags to <ptags. It was these that were faulting.



不太可能。有可能< http://validator.w3.org/会显示

嵌套错误。

Unlikely. Chances are that <http://validator.w3.org/would have shown
nesting errors.


Firefox不允许< ; ptags有一个[style =" display:none" ]

组件。
Firefox does not allow <ptags to have a [ style="display: none" ]
component.



废话。

Nonsense.


奇怪但真实,当转回DIV时它完美运行(即使在

MSIE)。
Strange but true, when turned back to DIV it works perfectly (even on
MSIE).



这表示到目前为止你的标记或你的脚本

质量很差,< p style =" display:none"> ...< / pworks in my Fx

3.0.1和所有其他支持CSS的UAs。

Which would indicate instead that either your markup or your script so far
is of poor quality, for <p style="display: none">...</pworks fine in my Fx
3.0.1 and all other CSS-capable UAs.


很抱歉打扰了你好人.....
Sorry to have disturbed you good people.....



不要抱歉*。*

PointedEars

-

使用任何版本的Microsoft Frontpage创建您的网站。

(这不会阻止人们查看您的来源,但没有人

会想要偷它。)

- 来自< http://www.vortex-webdesign.com/help/hidesource.htm>

Don''t be sorry for *that*.
PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won''t prevent people from viewing your source, but no one
will want to steal it.)
-- from <http://www.vortex-webdesign.com/help/hidesource.htm>


Firefox不允许< ptags有[style =" display:none" ]
Firefox does not allow <ptags to have a [ style="display: none" ]

component。
component.



废话。


Nonsense.



我同意PointedEars。这种说法完全是不真实的。我写了



以下程序,它在我测试的所有浏览器上都能完美运行

on。


...

< head>

...

< script type =" text / javascript" language =" JavaScript">

函数toggle_container(id)

{

var container = document.getElementById(id);

container.style.display =(container.style.display =="")

? "无" :"";

}

< / script>

< / head>

< ; body>

...

< a href =" javascript :void(0);"

onclick =" toggle_container(''some_text'');"> Toggle< / a>

< p id =" some_text" style =" display:;"> Hello there< / p>

...

< / body>

。 ..

I agree with PointedEars. This claim is completely untrue. I wrote
the
following program and it works perfectly on all browsers I tested it
on.

...
<head>
...
<script type="text/javascript" language="JavaScript">
function toggle_container(id)
{
var container = document.getElementById(id);
container.style.display = (container.style.display == "")
? "none" : "";
}
</script>
</head>
<body>
...
<a href="javascript:void(0);"
onclick="toggle_container(''some_text'');">Toggle</a>
<p id="some_text" style="display:;">Hello there</p>
...
</body>
...


奇怪但真实,当转回DIV时它完美无缺(即使在

MSIE)。
Strange but true, when turned back to DIV it works perfectly (even on
MSIE).



这表示到目前为止你的标记或你的脚本

质量很差,< p style =" display:none"> ...< / pworks in my Fx

3.0.1和所有其他支持CSS的UA。


Which would indicate instead that either your markup or your script so far
is of poor quality, for <p style="display: none">...</pworks fine in my Fx
3.0.1 and all other CSS-capable UAs.



我想补充一点,我在IE(5,6,7,8b)上检查了这段代码,并且

Firefox( infancy-3.0),

毕竟,检查浏览器兼容性是我工作的一部分。

I''d like to add that I checked this code on IE(5,6,7,8b) and
Firefox(infancy-3.0),
after all, checking for browser compatibility is kinda part of my job.


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

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