嗨,任何人都可以提供一些示例程序来提高浏览器与Firefox的兼容性 [英] Hi Can anyone give the some sample programs for browser compatability for firefox

查看:84
本文介绍了嗨,任何人都可以提供一些示例程序来提高浏览器与Firefox的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,有人可以提供基于样式的浏览器兼容性脚本和一些示例程序,以实现浏览器兼容性(适用于Firefox)

Hi can anyone give browser compatability script and some sample programs based on style for browser compatability (for firefox)

推荐答案

没有此类脚本.

许多功能和属性在不同的浏览器之间并不常见,因此您必须找出浏览器并编写兼容的代码.

以下脚本将为您提供帮助:

There is no such script.

There are lot of function and properties which are uncommon between different browsers, so you have to find out browser and write compatible code.

The following script will help you:

<script language="javascript">
var ua = navigator.userAgent
if (ua.indexOf("Firefox")>0)
{
    alert('Firefox!')
    //firefox compatible code
}
else
{
    alert('Other Browser!')
}
</script>


这篇关于嗨,任何人都可以提供一些示例程序来提高浏览器与Firefox的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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