关于Firefox的问题 [英] A question on Firefox

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

问题描述



Hello group,

我对我的js程序中使用的代码持怀疑态度。所有这一切

会检查正在运行的浏览器,并查明是否安装了FLASH




此代码用IE浏览器工作得很好但就Firefox而言我不确定。

使用firefox我可以很容易地看到flash页面但是当这段代码显示

firefox不是安装在我的firefox中!!!


有什么建议吗?


请知道我有另一台带firefox的机器(没有闪存)

并且代码反应良好。


提前致谢,

Amit。


Hello group,

I''m kinda skeptical about a code is being used in my js program. All it
does is checking what browser is being run and finds out if FLASH is
installed or not.

This code works just fine withe IE but as far as Firefox I''m not sure.
Using the firefox I can see flash pages easily but when this code says
firefox is not installed in my firefox!!!

Any suggestions?

Please know that I have another machine with firefox (without flash)
and the code reacts fine.

Thanks in advance,
Amit.

推荐答案

amit在2006年7月27日下午5:35发表以下内容:
amit said the following on 7/27/2006 5:35 PM:

Hello group,


我对我的js程序中使用的代码持怀疑态度。所有这一切

确实在检查正在运行的浏览器,并确定是否安装了FLASH


Hello group,

I''m kinda skeptical about a code is being used in my js program. All it
does is checking what browser is being run and finds out if FLASH is
installed or not.



检查正在运行的浏览器?是的,你应该非常怀疑

关于它。

"checking what browser is being run"? Yes, you should be very skeptical
about it.


这个代码适用于IE,但就Firefox而言我是不确定。
This code works just fine withe IE but as far as Firefox I''m not sure.



我敢打赌它没有。

I bet it doesn''t.


使用firefox我可以轻松看到flash页面但是当这段代码说好了我的firefox中没有安装
firefox !!!
Using the firefox I can see flash pages easily but when this code says
firefox is not installed in my firefox!!!



你的firefox中没有安装firefox?我想知道如何做到这一点

以便我可以在我的Firefox中安装我的firefox。

"firefox is not installed in your firefox"? I wanna know how to do that
so that I can have my firefox installed in my firefox.


有什么建议吗?
Any suggestions?



嗯,也许发布你的浏览器检测和Flash检测代码?

Ummm, perhaps posting your browser detection and Flash detection code?


请知道我有另一个使用firefox的机器(不带闪存)

并且代码反应良好。
Please know that I have another machine with firefox (without flash)
and the code reacts fine.



我打赌它不是,你只是认为它确实如此。但是,我不知道因为我不能看到b
$ b看不到代码.....


-

Randy

comp.lang.javascript常见问题 - http:// jibbering。 com / faq &新闻组每周

Javascript最佳实践 - http://www.JavascriptToolbox .com / bestpractices /

I bet it doesn''t, you just think it does. But, I wouldn''t know because I
can''t see the code.....

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/




Randy Webb写道:

Randy Webb wrote:

amit在2006年7月27日下午5:35发表以下内容:
amit said the following on 7/27/2006 5:35 PM:

Hello group,


我'我对js程序中正在使用的代码持怀疑态度。所有这一切

确实在检查正在运行的浏览器,并确定是否安装了FLASH


Hello group,

I''m kinda skeptical about a code is being used in my js program. All it
does is checking what browser is being run and finds out if FLASH is
installed or not.



检查正在运行的浏览器?是的,你应该非常怀疑

关于它。


"checking what browser is being run"? Yes, you should be very skeptical
about it.


这个代码适用于IE,但就Firefox而言我是不确定。
This code works just fine withe IE but as far as Firefox I''m not sure.



我打赌它没有。


I bet it doesn''t.


使用firefox我可以轻松看到flash页面但是当这段代码说好了我的firefox中没有安装
firefox !!!
Using the firefox I can see flash pages easily but when this code says
firefox is not installed in my firefox!!!



你的firefox中没有安装firefox?我想知道如何做到这一点

以便我可以在我的Firefox中安装我的firefox。


"firefox is not installed in your firefox"? I wanna know how to do that
so that I can have my firefox installed in my firefox.


有什么建议吗?
Any suggestions?



嗯,也许发布你的浏览器检测和Flash检测代码?


Ummm, perhaps posting your browser detection and Flash detection code?


请知道我有另一个使用firefox的机器(不带闪存)

并且代码反应良好。
Please know that I have another machine with firefox (without flash)
and the code reacts fine.



我打赌它不是,你只是认为它确实如此。但是,我不知道因为我不能看到b
$ b看不到代码.....


-

Randy

comp.lang.javascript常见问题 - http:// jibbering。 com / faq &新闻组每周

Javascript最佳实践 - http://www.JavascriptToolbox .com / bestpractices /


I bet it doesn''t, you just think it does. But, I wouldn''t know because I
can''t see the code.....

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/



嗨兰迪,


谢谢!这是代码:


IEFlashStat =((navigator.appName.indexOf(" Microsoft")!= -1)&&

( navigator.appVersion.indexOf(" Windows")!=

-1))&&

(parseFloat(navigator.appVersion)> = 4)? true

:false;

if(IEFlashStat)

{

alert(" IE and flash OK" );

//好的,浏览器检测为IE4或4+;准备好了

Flash事件

_bFlash = true;

}

其他

{

//浏览器不是IE所以请检查我们是否正在处理

NN或FF

NNFlashStat =((navigator.appName = =" Netscapt")&&

(navigator.userAgent.indexOf(" Mozilla")!= -1))

? ture:false;


if(NNFlashStat)

{

alert(" yep,Flash in FF or NN")) ;

_bFlash = true;

}

其他

{

_bFlash = false;

alert(你的FF或NN没有闪光);

}

}


请让我知道你对它的看法。


感谢您的帮助。

当我使用宏或预定义变量时Javascript

它有什么困难?


让我们在代码的顶部说:


var ms =" Microsoft";

navigator.appName.indexOf(ms)


无效。为什么?

Amit。


Hi Randy,

Thanks! here is the code:

IEFlashStat = ((navigator.appName.indexOf("Microsoft") != -1) &&
(navigator.appVersion.indexOf("Windows") !=
-1))&&
(parseFloat(navigator.appVersion) >= 4 ) ? true
: false;
if (IEFlashStat )
{
alert("IE and flash OK");
//Ok, the browser detected as IE4 or 4+; ready for
Flash events
_bFlash = true;
}
else
{
//The browser is not IE so check if we are dealing with
NN or FF
NNFlashStat = ((navigator.appName == "Netscapt") &&
(navigator.userAgent.indexOf("Mozilla") != -1))
? ture : false;

if (NNFlashStat)
{
alert("yep, Flash in FF or NN");
_bFlash = true;
}
else
{
_bFlash = false;
alert("no flash in your FF or NN");
}
}

Please let me know what you think of it.

Thanks for being helpful.
one more thing when I use macros or predefined variable in Javascript
it has difficulty why is that?

let''s say at the top of the code I have:

var ms = "Microsoft";
navigator.appName.indexOf(ms)

will not work. why?
Amit.


好吧,快点浏览我发现了这个......

NNFlashStat =((navigator.appName ==" Netscapt")&&


从什么时候开始有一个名为Netscapt的浏览器?你可以希望

prrof阅读更多...


" amit"< am ******** @ gmail.comwrote in message

新闻:11 ********************** @ s13g2000cwa.googlegr oups.com ...
Well, just browsing quickly I found this already...

NNFlashStat = ((navigator.appName == "Netscapt") &&

Since when has there been a browser called "Netscapt"? You may wish to
prrof read more...

"amit" <am********@gmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...

>

Randy Webb写道:
>
Randy Webb wrote:

> amit在7/27/2006上说了以下内容下午5:35:
>amit said the following on 7/27/2006 5:35 PM:

Hello group,


我对我的代码使用情况持怀疑态度所有它

确实在检查正在运行的浏览器,并确定是否安装了FLASH


Hello group,

I''m kinda skeptical about a code is being used in my js program. All it
does is checking what browser is being run and finds out if FLASH is
installed or not.


检查正在运行的浏览器&qu OT;?是的,你应该非常怀疑
关于它。


"checking what browser is being run"? Yes, you should be very skeptical
about it.


这个代码适用于IE,但就Firefox而言我不确定。
This code works just fine withe IE but as far as Firefox I''m not sure.


我打赌它没有。


I bet it doesn''t.


使用firefox我可以很容易地看到flash页面,但是这段代码说的话

firefox没有安装在我的firefox中!
Using the firefox I can see flash pages easily but when this code says
firefox is not installed in my firefox!!!


你的firefox中没有安装firefox?我想知道如何做到这一点
以便我可以在我的Firefox中安装我的firefox。


"firefox is not installed in your firefox"? I wanna know how to do that
so that I can have my firefox installed in my firefox.


有什么建议吗?
Any suggestions?


嗯,也许发布你的浏览器检测和Flash检测代码?


Ummm, perhaps posting your browser detection and Flash detection code?


请知道我有另一台机器用firefox(没有闪光灯)

并且代码反应良好。
Please know that I have another machine with firefox (without flash)
and the code reacts fine.


我打赌它不是,你只是认为它确实如此。但是,我不知道因为我看不到代码.....

-
Randy
comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组每周
Javascript最佳实践 -
http://www.JavascriptToolbox .com / bestpractices /


I bet it doesn''t, you just think it does. But, I wouldn''t know because I
can''t see the code.....

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices -
http://www.JavascriptToolbox.com/bestpractices/




嗨兰迪,


谢谢!这是代码:


IEFlashStat =((navigator.appName.indexOf(" Microsoft")!= -1)&&

( navigator.appVersion.indexOf(" Windows")!=

-1))&&

(parseFloat(navigator.appVersion)> = 4)? true

:false;


if(IEFlashStat)

{

alert(" IE)和闪存确定);

//好的,浏览器检测为IE4或4+;准备好了

Flash事件

_bFlash = true;

}

其他

{

//浏览器不是IE所以请检查我们是否正在处理

NN或FF

NNFlashStat =((navigator.appName = =" Netscapt")&&

(navigator.userAgent.indexOf(" Mozilla")!= -1))

? ture:false;


if(NNFlashStat)

{

alert(" yep,Flash in FF or NN")) ;

_bFlash = true;

}

其他

{

_bFlash = false;

alert(你的FF或NN没有闪光);

}

}


请让我知道你对它的看法。


感谢您的帮助。


当我使用宏时还有一件事或Javascript中的预定义变量

它有什么困难?


让我们在代码的顶部说:


var ms =" Microsoft";

navigator.appName.indexOf(ms)


无效。为什么?


Amit。



Hi Randy,

Thanks! here is the code:

IEFlashStat = ((navigator.appName.indexOf("Microsoft") != -1) &&
(navigator.appVersion.indexOf("Windows") !=
-1))&&
(parseFloat(navigator.appVersion) >= 4 ) ? true
: false;
if (IEFlashStat )
{
alert("IE and flash OK");
//Ok, the browser detected as IE4 or 4+; ready for
Flash events
_bFlash = true;
}
else
{
//The browser is not IE so check if we are dealing with
NN or FF
NNFlashStat = ((navigator.appName == "Netscapt") &&
(navigator.userAgent.indexOf("Mozilla") != -1))
? ture : false;

if (NNFlashStat)
{
alert("yep, Flash in FF or NN");
_bFlash = true;
}
else
{
_bFlash = false;
alert("no flash in your FF or NN");
}
}

Please let me know what you think of it.

Thanks for being helpful.
one more thing when I use macros or predefined variable in Javascript
it has difficulty why is that?

let''s say at the top of the code I have:

var ms = "Microsoft";
navigator.appName.indexOf(ms)

will not work. why?
Amit.



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

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