I am trying to write IE specific code that
if (agent.indexOf("MSIE") != -1) { alert('IE'); //IE specific }
But when I tried Alert (agent.indexOf ("MSIE")); He typed -1. But I can correctly use my current browser using agent.indexOf () in Firefox and Chrome.
Can someone help me write code for a specific browser? I checked the previous questions based on the browser code, but none helped. The problem occurs in IE 11 version 11.0.24 as well as 11.0.25. Thanks.
, IE ActiveXObject, , - , , , . , , , . , , , IE. if ('ActiveXObject' in window) { alert('IE'); }
ActiveXObject
if ('ActiveXObject' in window) { alert('IE'); }
Source: https://habr.com/ru/post/1619176/More articles:notification sound does not work for api 10 android - androidParseQuery null search parameter - androidfill in the missing values ββusing match_recognize - sqlRun the dot net 3.5 app on Windows 10 - c #ZK How to create a container in readonly mode (layout of the Div window)? - zkZK Disbale Div, Window, Layout Component? - zkInstall firefox on elastic beanstalk using ebextensions configuration? - firefoxErlang - Is there anything in Mnesia similar to ORDER BY in mysql? - erlangJavaFX is a relative threshold - javaGoogle Maps API v3 add shadow to marker by clicking - javascriptAll Articles