Last active
August 29, 2015 13:56
-
-
Save xfoxfu/9248986 to your computer and use it in GitHub Desktop.
Anti XP JavaScript ( ** DO NOT USE IN PRODUCTION ENV !!! ** )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sUserAgent = navigator.userAgent; | |
| if (sUserAgent.indexOf("Windows NT 5.1") > -1 | |
| || sUserAgent.indexOf("Windows Xp") > -1) { | |
| alert("你仍然在使用落后的Windows XP操作系统,在你升级操作系统前将不能打开此页面。如果你认为识别有误,请联系管理员。"); | |
| window.opener = null; | |
| window.open('', '_self'); | |
| window.close(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment