<! DOCTYPE html>
<meta charset= "UTF-8" >
<script type= "Text/javascript" src= "Angular.js" ></script>
<script>
var app = Angular.module ("MyApp", []);
App.controller ("Myctrl", Function ($scope, $timeout) {
Get width
var wd = Window.screen.width;
$timeout (function () {
$scope. widths = WD;
},2000);
Get height
var hg = Window.screen.height;
$timeout (function () {
$scope. Heights = HG;
},2000);
Get title
var tt = document.getElementById ("Biaoti"). InnerHTML;
$timeout (function () {
$scope. titles = TT;
},3000);
Get URL Protocol
var ur = window.location.protocol;
$timeout (function () {
$scope. urls = ur;
},3000);
Get URL Host
var hs = Window.location.host;
$timeout (function () {
$scope. URLSS = HS;
},3000);
Get Port number
var po = window.location.port;
$timeout (function () {
$scope. Dkhs = PO;
var CF = confirm ("Whether the port number is displayed");
if (cf==true) {
$scope. Dkhs = PO;
}
},5000);
Get the hash portion of the URL
var ha = Window.location.pathname.hash;
$timeout (function () {
$scope. Dkhs = PO;
var CF = confirm ("Whether to show the hash portion of the url");
if (cf==true) {
$scope. hashs = ha;
}
},5000);
Get access Address
var pn = Window.location.pathname;
$timeout (function () {
$scope. Dkhs = PO;
var CF = confirm ("Show access Address");
if (cf==true) {
$scope. DZs = PN;
}
},5000);
});
</script>
<title id= "Biaoti" >123</title>
<body ng-app= "MyApp" ng-controller= "Myctrl" >
<p> Frequency screen width is:{{widths}}</p>
<p> frequency screen height is:{{heights}}</p>
<p> Page title is:{{titles}}</p>
The <p>url protocol is:{{urls}}</p>
<p>url Host is:{{urlss}}</p>
<p> Port number is:{{dkhs}}</p>
The hash part of <p>url is:{{hashs}}</p>.
<p> Access address is:{{dzs}}</p>
</body>
Get Windows objects such as URLs, port numbers, etc., timed to show up