How does js get the access page record (can you tell me what you know)
The boss assigned a task this time, but I can't do it in several places. Please do me a favor. The main task is to use js to get: 1. The source of the website is intercepted 2. Intercept 3. 3 by IP. The Internet address is intercepted 4. The operating system intercepts 5. Resolution intercept 6. Access to the page count record, but I can only get 1. Source of the website 4. Operating system 5. Resolution of these several, of which the Internet IP, the address I intercepted, but some people say that my method of interception is not good, so can any of you tell me how to intercept these? thank you, this is the code I wrote, can you tell me what the text effect is?
Current user access information
.mains {width:400px;height:300px;border:1px solid # 333 nbsp. LeftVlul 60pxx Mattel Topsvl 60pxterFontLizePlus 14pxmitpaddingPOS 10px;}
.guanjian {width:30%;height:30px;float:left;}
.huoqu {width:70%;height:30px;float:left;}
systems analysis
Initial source:
Search keywords:
IP on the Internet:
[xss_clean] (returnCitySN ["cip"])
Internet address:
[xss_clean] (returnCitySN ["cname"])
Operating system:
Resolution:
Number of pages visited:
/ / obtain the initial source
$ly= [XSS _ clean] (document.referrer)
(".laiyuan") .text ($ly)
/ / get search keywords
Function GetQueryString ($name) {
Var $index=document.referrer.indexOf ($name+ "="), $estrangulated'
If ($index > 1) {
$e=document.referrer.substring ($index+$name.length+1)
If (($index=$e.indexOf ("&")) > 0) {
$e=$e.substring (0quotation index)
}
}
Return $e
}
$wd=GetQueryString ("wd")
If ($wd&&$wd.length > 0) {
$wd=decodeURIComponent ($wd);}
(".word") .text ($wd)
/ / obtain IP on the Internet
/ / obtain the Internet address
/ / obtain the operating system
Function detectOS () {
Var sUserAgent = navigator.userAgent
Var isWin = (navigator.platform = = "Win32") | | (navigator.platform = = "Windows")
Var isMac = (navigator.platform = = "Mac68K") | | (navigator.platform = = "MacPPC") | | (navigator.platform = = "Macintosh") | | (navigator.platform = = "MacIntel")
If (isMac) return "Mac"
Var isUnix = (navigator.platform = = "X11") & &! isWin & &! isMac
If (isUnix) return "Unix"
Var isLinux = (String (navigator.platform) .indexOf ("Linux") >-1)
If (isLinux) return "Linux"
If (isWin) {
Var isWin2K = sUserAgent.indexOf ("Windows NT 2000") >-1 | | sUserAgent.indexOf ("Windows 2000") >-1
If (isWin2K) return "Win2000"
Var isWinXP = sUserAgent.indexOf ("Windows NT 5.1") >-1 | | sUserAgent.indexOf ("Windows XP") >-1
If (isWinXP) return "WinXP"
Var isWin2003 = sUserAgent.indexOf ("Windows NT 2003") >-1 | | sUserAgent.indexOf ("Windows 5.2") >-1
If (isWin2003) return "Win2003"
Var isWinVista= sUserAgent.indexOf ("Windows NT 6.0") >-1 | | sUserAgent.indexOf (" Windows Vista ") >-1
If (isWinVista) return "WinVista"
Var isWin7 = sUserAgent.indexOf ("Windows NT 6.1") >-1 | | sUserAgent.indexOf ("Windows 7") >-1
If (isWin7) return "Win7"
}
Return "other"
}
$xt=detectOS ()
$(".xitong") .text ($xt)
/ / obtain resolution
$fbl_1=screen.width
$fbl_2=screen.height
$fbl=$fbl_1+ "*" + $fbl_2
$(".fenbianlv") .text ($fbl)
/ / get the number of access pages
This picture is the final effect diagram, and the main data obtained is in the system analysis.