Home > Web Front-end > JS Tutorial > body text

Summary of methods for obtaining several URL addresses with JS_javascript skills

WBOY
Release: 2016-05-16 16:58:13
Original
1000 people have browsed it

The following are JS methods to obtain several URL addresses

Copy the code The code is as follows:

thisURL = document.URL;
thisHREF = document.location.href;
thisSLoc = self.location.href;
thisDLoc = document.location;

thisTLoc = top.location.href;
thisPLoc = parent.document.location;
thisTHost = top.location.hostname;
thisHost = location.hostname;

tmpHPage = thisHREF.split( "/" );
thisHPage = tmpHPage[ tmpHPage.length-1 ];
tmpUPage = thisURL.split( "/" );
thisUPage = tmpUPage[ tmpUPage .length-1 ];


The following is how to use JS to obtain the MAC address, IP address and host name:
Copy code The code is as follows:






                                   



MAC address:

IP Address:

Host name:



Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template