This style of writing is to use the browser to the escape character "\v" different understanding of the browser type.
In IE, "\v" is not escaped, resulting in "V".
In other browsers, "\v" represents a vertical tab, so IE resolves "\v1" to "V1", while other browsers resolve to "\V1" to "1".
Add a "+" to the front to convert the following string into a number.
Because IE thinks "\v1" is "v1", so the preceding plus plus sign cannot be converted to a number, Nan
All other browsers can turn into 1.
The above is Baidu found the answer.
But the following I test the time unexpectedly appeared such a problem!
if (!+ "\v1") { alert ("IE");} Else { alert ("non ie");}
ie under (IE9):
Google under:
Under Firefox:
Is it not possible to pass this judgment now? Personally think so!
Change the IE mode to IE8 and get the result we want.
Can this now be judged by IE9 and IE8? - -
!+ "\v1" is used to "determine browser type" or "IE Judge version" Problem!