开发者

IE - specific message

开发者 https://www.devze.com 2023-04-13 02:15 出处:网络
I use SVG Charts on my website. It works in all browsers except IE. I would like to add a snippet of PHP code with a me开发者_Go百科ssage for IE users.

I use SVG Charts on my website. It works in all browsers except IE. I would like to add a snippet of PHP code with a me开发者_Go百科ssage for IE users.

I think I can get the agent info with PHP, but I'm not sure how to detect version. I believe IE 9 supports it now, so I need only for versions below IE 9.


You don't need PHP for this.

Instead, use conditional comments.


Try this : http://php.net/manual/en/function.get-browser.php


You could use the PHP function get_browser. See here.

The site contains numerous examples of how to detect the browser and display an appropriate message.


Put this around the html

<![if lt IE 9]> 
    Show stuff to browsers => IE 9
<![endif]-->
<!--[if lt IE 9]> 
    hide stuff from browsers < IE 9
<![endif]-->
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号