JS How to get access page records (know can tell me)

Source: Internet
Author: User

This time the boss assigned a task, but I have a few places not, please help a busy. This task is mainly to use JS to get: 1. Site source interception 2. Internet IP intercept 3. Internet address interception 4. Operating system interception 5. Access to page records, but I can only get to 6. Website Source 1. Operating system 4. Resolution of these several, which Internet IP, address I was intercepted to, But some people say that I do not have this kind of truncation method, so you who see can tell me how these are intercepted, thank you, this is the code I wrote, can you tell me what the text effect is?


<! DOCTYPE html>

<meta charset= "UTF-8" >

<title> Current user access information </title>

<script src= "Http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js" ></script>

<style type= "Text/css" >

. mains{width:400px;height:300px;border:1px solid #333; margin-left:60px;margin-top:60px;font-size:14px;padding : 10px;}

. Guanjian{width:30%;height:30px;float:left;}

. Huoqu{width:70%;height:30px;float:left;}

</style>

<body>

<div class= "mains" >

<div><div class= "First" > Initial Source: </div><div class= "Huoqu Laiyuan" ></div></div>

<div><div class= "Guanjian" > Search keywords: </div><div class= "Huoqu word" ></div></div>

<div><div class= "Guanjian" > Internet ip:</div><div class= "Huoqu IP" >

<script src= "Http://pv.sohu.com/cityjson?ie=utf-8" ></script>

<script type= "Text/javascript" > document.write (returncitysn["CIP"]) </script>

</div></div>

<div><div class= "Guanjian" > Internet address: </div><div class= "Huoqu" >

<script type= "Text/javascript" > document.write (returncitysn["CNAME"]) </script>

</div></div>

<div><div class= "Guanjian" > Operating system: </div><div class= "Huoqu xitong" ></div></div>

<div><div class= "Guanjian" > Resolution: </div><div class= "Huoqu fenbianlv" ></div></div >

<div><div class= "Guanjian" > Access pages: </div><div class= "Huoqu" ></div></div>

</div>


<script type= "Text/javascript" >

Get initial source

$ly =document.write (Document.referrer);

$ (". Laiyuan"). Text ($ly);


Get search Keywords

function GetQueryString ($name) {

var $index =document.referrer.indexof ($name + "="), $e = ';

if ($index >1) {

$e =document.referrer.substring ($index + $name. length+1);

if ($index = $e. IndexOf ("&")) >0) {

$e = $e. substring (0, $index);

}

}

return $e;

}

$WD =getquerystring ("WD");

if ($wd && $wd. length>0) {

$WD =decodeuricomponent ($WD);}

$ (". Word"). Text ($WD);

Get Internet IP




Get the Internet address

Get 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 5.0") >-1 | | Suseragent.indexof ("Windows") >-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 5.2") >-1 | | Suseragent.indexof ("Windows 2003") >-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);

Get resolution

$FBL _1=screen.width;

$FBL _2=screen.height;

$FBL = $FBL _1+ "*" + $FBL _2;

$ (". FENBIANLV"). Text ($FBL);

Get access Pages


</script>

</body>

This picture is final, the main acquired data in the system analysis inside 650) this.width=650; "Src=" http://s1.51cto.com/wyfs02/M02/89/29/ Wkiol1gjxurj4qgiaajqf6qwine438.gif-wh_500x0-wm_3-wmp_4-s_2462290981.gif "title=". gif "alt=" Wkiol1gjxurj4qgiaajqf6qwine438.gif-wh_50 "/>

This article is from the "Front End" blog, so be sure to keep this source http://xhlsky.blog.51cto.com/9087386/1864319

JS How to get access page records (know can tell me)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.