mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
Base: Move all the HTML test content into /res/html/misc
This commit is contained in:
parent
4720635aab
commit
de12cf6821
58 changed files with 1 additions and 1 deletions
33
Base/res/html/misc/location.html
Normal file
33
Base/res/html/misc/location.html
Normal file
|
@ -0,0 +1,33 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>window.location test</title>
|
||||
<style>
|
||||
#set_href { background-color: red; color: yellow; }
|
||||
#reload { background-color: blue; color: #ccc; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<pre></pre>
|
||||
<div id="set_href">Click me to set location.href!</div>
|
||||
<div id="reload">Click me to call location.reload()!</div>
|
||||
<script>
|
||||
var pre = document.querySelector("pre");
|
||||
pre.innerHTML += "href: " + location.href + '\n';
|
||||
pre.innerHTML += "protocol: " + location.protocol + '\n';
|
||||
pre.innerHTML += "host: " + location.host + '\n';
|
||||
pre.innerHTML += "hostname: " + location.hostname + '\n';
|
||||
pre.innerHTML += "pathname: " + location.pathname+ '\n';
|
||||
pre.innerHTML += "hash: " + location.hash + '\n';
|
||||
pre.innerHTML += "search: " + location.search + '\n';
|
||||
|
||||
document.getElementById("set_href").addEventListener("mousedown", function() {
|
||||
window.location.href = 'http://serenityos.org/';
|
||||
});
|
||||
|
||||
document.getElementById("reload").addEventListener("mousedown", function() {
|
||||
window.location.reload();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue