如果浏览器是IE6,则隐藏特定的DIV [英] Hide a specific DIV if browser is IE6

查看:111
本文介绍了如果浏览器是IE6,则隐藏特定的DIV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个DIV在我的网站上调用一些外部javascripts ... unfortunatley的供应商不支持IE6。



我得到的错误是,我们的https网站传递的内容不安全,您想查看内容... blah blah ...



如果浏览器是IE6,可以隐藏此div

 < div id =get-satisfaction> 
< style>
a#fdbk_tab {
top:60px;

}
< / style>


< script type =text / javascriptcharset =utf-8>


//此处的内容

< / script>
< / div>


解决方案

  ! -  [if IE 6]> 
< style> #DIVID {display:none;}< / style>
<![endif] - >

更好的选择是检测浏览器服务器端,如果是IE6则不显示javascript标签。 / p>

I have a DIV on my site that calls a few external javascripts... unfortunatley the vendor does not support IE6. This script is in the global footer, so its on every page.

I get the error that our https site is passing content that is not secure, would you like to view the content...blah blah...

Is is possible to just hide this div if the browser is IE6??

<div id="get-satisfaction">
<style>
a#fdbk_tab {
top:60px;

}
</style>


<script type="text/javascript" charset="utf-8">


  //content here

</script>
</div>

解决方案

    <!--[if IE 6]>
    <style>#DIVID {display: none;}</style>
    <![endif]--> 

A better option is to detect the browser server side and not render the javascript tag if it's IE6.

这篇关于如果浏览器是IE6,则隐藏特定的DIV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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