<?
echo '<!doctype html>
<html>
<head>
<title>PHP</title>
<style>
a
{
background-color: rgba(255,0,255,0.1);
color: purple;
}
a:hover
{
background-color: rgba(0,0,0,0.1);
color: black;
}
</style>
</head>
<body>
<a href="/php/">PHP</a>
<script>
function myfunction()
{
const myelement = document.querySelector("a");
const mystyle = myelement.style;
mystyle.position = "absolute";
mystyle.left = Math.random() * (window.innerWidth - myelement.offsetWidth) + "px";
mystyle.top = Math.random() * (window.innerHeight - myelement.offsetHeight) + "px";
}
document.querySelector("a").addEventListener("mouseout", myfunction);
</script>
</body>
</html>';
?>
<!doctype html>
<html>
<head>
<title>PHP</title>
<style>
a
{
background-color: rgba(255,0,255,0.1);
color: purple;
}
a:hover
{
background-color: rgba(0,0,0,0.1);
color: black;
}
</style>
</head>
<body>
<a href="/php/">PHP</a>
<script>
function myfunction()
{
const myelement = document.querySelector("a");
const mystyle = myelement.style;
mystyle.position = "absolute";
mystyle.left = Math.random() * (window.innerWidth - myelement.offsetWidth) + "px";
mystyle.top = Math.random() * (window.innerHeight - myelement.offsetHeight) + "px";
}
document.querySelector("a").addEventListener("mouseout", myfunction);
</script>
</body>
</html>