66 lines
2.2 KiB
HTML
66 lines
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Women4IT - JavaScript</title>
|
|
<meta name="description" content="Women4IT JavaScript Exercise: Variables -1">
|
|
<!-- Bootstrap CSS -->
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
|
<!-- Customise Bootstrap for practical grid layouts -->
|
|
<link rel="stylesheet" href="../assets/css/bootstrap-custom.css">
|
|
<style>
|
|
.container { padding-top: 40px }
|
|
.js-box {
|
|
border:solid 1px yellow;
|
|
padding:20px;
|
|
background-color: lightyellow;
|
|
margin-bottom:20px;
|
|
font-size: larger;
|
|
}
|
|
.js-box p:last-child { margin-bottom: 0 }
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<div class="container col-md-8 offset-md-2">
|
|
<h1><b>Exercise 2-1</b>: Objects, Properies and Methods</h1>
|
|
<p>These scripts reveal information about your computer's operating system, web browser, window and web page.</p>
|
|
|
|
<h2>Web page URL</h2>
|
|
<div class="js-box">
|
|
<script>
|
|
document.write("<p><b>"+window.location.href+"<\/b><\/p>");
|
|
</script>
|
|
</div>
|
|
|
|
<h2>Web page details</h2>
|
|
<div class="js-box">
|
|
<script>
|
|
document.write("<p>Title: <b>"+document.title+"<\/b><\/p>");
|
|
document.write("<p>Last Updated: <b>"+document.lastModified+"<\/b><\/p>");
|
|
document.write("<p>Referrer: <b>"+document.referrer+"<\/b><\/p>");
|
|
</script>
|
|
</div>
|
|
|
|
<h3>OS platform and web browser</h3>
|
|
|
|
<div class="js-box">
|
|
<script>
|
|
document.write("<p><b>"+navigator.userAgent+"<\/b><\/p>");
|
|
</script>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- jQuery library -->
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
<!-- Popper JS -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
|
|
<!-- Latest compiled JavaScript -->
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
|
|
|
|
</body>
|
|
</html> |